Modify parameters for an already loaded scene #465
Replies: 1 comment
-
I missed this but it sounds like you're doing it right. The flags are there to stop unloading when no clients are present. You can also laod scenes on clients only without needing to use the servers sceneManager, unless the said scene has networked objects that is. |
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
-
Hi there!
Im currently implementing a multi scene game with (hopefully at some point) a dedicated server.
To connect the players, I have an Entrypoint scene on the server and clients connecting to this create their player and get moved to their specific scenes they can play in then.
My current problem is, that the Entrypoint scene will get unloaded on the server and on the clients, which is a problem for the server since its not possible to spawn new players in the Entrypoint scene on the server afterwards.
To work around this issue, I have made a call to the scene manager in a script in the Entrypoint scene, which loads the Entrypoint scene and flags it as not unloaded.
The call itself is not loading any scenes, since it is already loaded, but instead just flags the Entrypoint scene to not get unloaded automatically.
Is there a more elegant solution I currently am not seeing?
Otherwise, would it be an addition to FishNet to manipulate a currently loaded scene? For example to set it should not be automatically unloaded.
Another addition to that I am currently missing, is to get the scene load data after a scene has loaded. If it is not possible to query that data, one could of cause write a script to save that data separately, but I think there should be in general some more ways to deal with current attributes for the scene manager rather to depent all on the events and "cache"/map the data yourself.
Hope that was understandable.
Greetings,
Michiruf
Beta Was this translation helpful? Give feedback.
All reactions