#Proper Scene Management in multi-scene server solution.

9 messages · Page 1 of 1 (latest)

wanton sinew
#

I also tried using SceneManager.OnClientPresenceChangeEnd with same logic per player / connection (instead of loop as shown above), but then it does not work on the server/client and it is generally buggy; so I trashed that change. :/

vestal stone
#

Ah you using? My suggestion would be, that the clients send a Broadcast when they arrived in the game scene and have the Character Addressable loaded

hushed sundial
#

@wanton sinew do you using Lobby And Worlds?

wanton sinew
# hushed sundial <@285459073300955147> do you using Lobby And Worlds?

Hey there. I followed the tutorial, but ultimately customized it.

Application starts -> user selects either Client or Server/Client button -> (PLACEHOLDER for logic to get serverip and port, durign development connects to localhost and port).
When Server/Client starts, "PreGame" scene gets loaded and a "GameManager" gets spawned by the server. For Cient and Server/Client a "Player" network object gets created on connection through the NetworkManager. GameManager loops through states in private void Update(). Client connects and both players are now ready. Up until now, all works and all is fine.

Now in GameManager I come to the point where I want to load the "Game" scene and spawn the character for each player.

#

(Which is the code shown above)

hushed sundial
#

you don't need to spawn environment on server for each room

#

so to optimize that, players should locally additively load for themselves environment scene

#

that's why you can use built-in Unity's scene loader for player

#

also check that player characters should have SceneCondition in NetworkObserver