- Home /
I want to set play scene of network lobby manger through script
I have tried
private void Awake()
{
//It won't Compile without ToString();
playScene = SceneManager.GetSceneByBuildIndex(5).ToString();
}
and I have tried to make an array of Scenes
Scene[] Scenes;
private void Awake()
{
Scenes = new Scene[10];
for(int i = 0 ; i < SceneManager.SceneCountInBuildSettings; i++)
{
Scenes[i] = SceneManager.GetSceneByBuildIndex(i);
}
//It won't Compile without ToString();
playScene = SceneManager.GetSceneByBuildIndex(PlayerPrefs.GetInt("Level")).ToString();
}
Comment
Your answer
Follow this Question
Related Questions
This is giving an error for the other client and cannot hit other client. 1 Answer
How to make buttons have sound when it is highlighted and clicked? 0 Answers
Can I see how many bytes are being sent by a particular SyncVar variable? 1 Answer
Network Transport Layer API does not work with iOS to PC? 1 Answer
Unity Scene not loading. 1 Answer