Answer the question
In order to leave comments, you need to log in
unity. Passing data to other scenes?
I'm making a game like "Mental Counting" and the game has a choice of difficulty (Easy, Middle, Hard, Very Hard), and you need to make it so that if he clicks on Easy, then random numbers of the Easy difficulty level are counted in the new scene. And also with the rest of the difficulties. Now I have a question, how to implement this?
PS I forgot to send the code
public class PlayGame : MonoBehaviour
{
public int difficuality;
public void Pressefction()
{
if(difficuality == 0)
{
Debug.Log("Изи");
SceneManager.LoadScene(2);
}
else if(difficuality == 1)
{
Debug.Log("Миддле");
}
else if (difficuality == 2)
{
Debug.Log("Хард");
}
else if (difficuality == 3)
{
Debug.Log("Вери Хард");
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question