Global Scene Network Objects - Hear Me Out Please. #488
Closed
Katerlad
started this conversation in
Feature Request
Replies: 1 comment 4 replies
-
You actually can mark the prefab as global but not any instances placed in the scene. In fact, if you have a scene object marked as global FN warns you that the scene object will not be set global. I do not think it's worth adding the complexity of automatically spawning scene prefabs just to make them global. Users could write a simple script and slap it on the NetworkManager to instantiate any number of prefabs as global upon start. Or the script could go in the scene. Going to have to decline this one, sorry. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know this has been brought up many times in the past, but I feel an in depth conversation has not been had to find a solution. If so I wasn't there to start a fire 🔥 😆
Background
I remember one of your last conclusions on this was that Scene Network Objects cannot be marked global because the clients would of had to at least load that scene once to be able to also spawn the object and be synced together. Which is not ideal, so you have disabled this functionality as a protection to the user to not make this mistake.
Potential Solution
However! Correct me if I am wrong, but is there not a way to just require Global Scene Network Objects to be prefabs the DefaultPrefabsObject has registered?, and upon the client connection to the server, the server will look for any global objects that were scene objects and Spawn them as global to the clients?
I understand that in the Scenes you would not be able to modify the Scene Object Prefab to have Custom Values in any of the components that are not Network Behaviours, because the server would only ever be able to spawn the DefaultPrefabObject.
^ I feel that putting this in the docs as what the restriction actually is, and to allow users to still drag default prefab objects as a Scene Object and mark them global is the way to go!
Conclusion
I get why a normal scene object that is not a prefab, cannot be handled this way, because the server has no Idea what object to spawn., but as long as the scene object is a prefab. The scene object should have an NetworkID associated and registered in the defaultPrefabObjects, and the server should be able to spawn this in for clients.
Im probably missing something silly that makes this all moot point, but I don't want to go down without a fight haha.
When you have time to even discuss this which may not be awhile, we should get together on a discord call and hash out the details!
Beta Was this translation helpful? Give feedback.
All reactions