Hi =)
Instead of loading the scene index 0, I directly loaded the menu scene with its name by doing this :
public void LoadMenuScene()
{
SceneManager.LoadScene(“Start Menu”);
}
Is it okay to do so or can it create issues later? Thanks !
Hi =)
Instead of loading the scene index 0, I directly loaded the menu scene with its name by doing this :
public void LoadMenuScene()
{
SceneManager.LoadScene(“Start Menu”);
}
Is it okay to do so or can it create issues later? Thanks !
It would be fine, the only issue would be if you change the scene name. However using an index could have other benefits that may not directly apply to a menu scene.
for example if you have multiple levels like in block breaker and you want to load the next level you could get the current level index and load current index+1. Then if you decide to resequence you levels you don’t have to change names. Just reorder them in the build screen.
Thank you
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.