1
NGUI 3 Support / Load new Scene on Button Press
« on: January 22, 2018, 02:52:19 AM »
Hi, i am new to ngui. I want jump to the next Scene on Button Press. It works, but it is not very flexible.
public void OnClick ()
{
SceneManager.LoadScene (1);
}
How can i have a public int that i can change on the Button it self? The public int is not shown in Inspector like in Unitys Ui system.
I want to have something like this or a better way to organize things. Any ideas? Thanks for your time
public int changeScene;
// Use this for initialization
public void OnClick (){
SceneManager.LoadScene (changeScene);
}
}
public void OnClick ()
{
SceneManager.LoadScene (1);
}
How can i have a public int that i can change on the Button it self? The public int is not shown in Inspector like in Unitys Ui system.
I want to have something like this or a better way to organize things. Any ideas? Thanks for your time
public int changeScene;
// Use this for initialization
public void OnClick (){
SceneManager.LoadScene (changeScene);
}
}