- Home /
Unity networking, access online scenes variable in network manager
How can I access online scenes variable in network manager? I have main menu scene and there player chooses which map he wants, then he hosts server and I need to spawn him on chosen map,
Is there any function like: networkManager.onlinescene("somescene"); ?
2) and also another question, if network manager is in main menu scene, how can I put Spawn points from another scene?
BTW I answered my first question, I can use manager.onlineScene = "island"; but still having problem with second question.
Answer by Guhanesh · Apr 22, 2016 at 07:17 AM
2.Add a Empty GameObject in your "another scene" , add NetworkStartPosition Component and move its position to the spawn position.Player will be spawned at this position. You cannot add spawn positions in network manager inspector.
There is no NetworkSpawnPosition components, but there is networkStartComponent, is it it?
yes it was, Thank you for your answer you really helped me out!
sorry.u r right. it is network startposition component.I will edit the answer.