Allow clients to manually notify server when a scene is done loading. #564
Closed
KeithSwanger
started this conversation in
Feature Request
Replies: 2 comments
-
This is already possible without any extra features needed.
No custom observer conditions needed. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That seems very reasonable! Discussions on the discord never mentioned that technique, but that seems perfect for my use case. Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to the SceneManager Scene Events diagram, loading a scene goes a little something like this:
It would be very useful if the "Load Completed" message sent from the client to the server could be delayed and manually sent later by the client. This would allow any asynchronous initialization of non-networked objects in the scene to be fully initialized client-side before observers are spawned for the client.
For a more concrete example, imagine I have a world generator that takes a seed and procedurally generates a terrain. This seed is synced in a Lobby scene. The server then tells the client to load the World scene.
When the client loads the World scene, the world generator uses the seed to generate the terrain, which will take some time to generate asynchronously. Since this generation takes time, the client has already notified the server that the World scene is loaded. The observers are spawned for the client, and they start glitching as they fall through an empty world with no terrain.
Right now, my solution has been to create a custom Observer Condition to assure that the client has fully initialized the scene. However, if we could manually decide when the "Load Completed" message is sent from the client to the server, this custom Observer Condition would be unnecessary!
Beta Was this translation helpful? Give feedback.
All reactions