ServerManager.Spawn(scene) is Currently not Synchronized so the client also spawns object to that scene. #537
Closed
Katerlad
started this conversation in
Feature Request
Replies: 1 comment
-
There have been API added to spawn nobs in certain scenes now on the server. The active scene of the nob is not automatically synchronized to clients though. There has been discussion of adding a scene sync option and it's been tested as possible, but to be put in properly several more refactors remain. I'll put this on the road map in the mean time. |
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 AnkleBreakerStudio,
Passing a scene to spawn nobs only happens on the server and its done by just moving the game object before the spawn call , synchronize this so client as well puts the object in the right scene.
I have not tested this myself, but it does appear to be true by glancing at the code. I could of missed some magic happening where the nob may know what scene its suppose to be apart of and when the client receives the nob from the spawn broadcast, put it in the right scene, but it sounds like this does not happen according to ABS
Looking at the code, maybe during rebuilding of observers on the Spawn Broadcast, could take the current scene the object is in on the server.
Or the Nob could keep reference to the scenelookupdata it is apart of? Would be easier to implement with NetworkScenes from SceneManager V2 Idea.
Beta Was this translation helpful? Give feedback.
All reactions