Answer the question
In order to leave comments, you need to log in
How to save random value in unity3d?
public class TestScript : MonoBehaviour
{
public int RandomInt;
public void RandomGo()
{
RandomInt =Random.Range(1,300000000);
PlayerPrefs.Setint("RSave", RandomInt);
}
}
Answer the question
In order to leave comments, you need to log in
We start a flag for which thread of the wasFirstTap type. In pressing, we check - if the flag is not raised - we generate a number, save it to a variable or wherever you need it; if we erect - we read from where it is necessary.
The question is trivial. It's too early for you to play the game.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question