@mortal ether See Image. This method takes all Spawned Objects on the client and moves them into the moved object scene befor deciding to keep them or not. Doesnt necessarily break anything but for organization there should be a check to keep objects in DDOL IMO, If you think this is considered a bug I can file, if not I can put as a Suggestion.
#Client Moves Global DDOL objects into MovedObjectScene instead of keeping in DDOL
30 messages · Page 1 of 1 (latest)
hmm you make a very good point
I think not moving them if theyre in DDOL is fine, long as they are marked as global
want me to add as suggestion or a bug? so we dont lose sight?
file an issue as suggestion plz. I'm actually going to shutdown the suggestions channel in favor of git so I stop losing track of things
please copy my notes above 😄
@mortal ether Hey bud sorry to bother again, I think we found more problems with this same step.
This part of __loadScenes() does not take into account nested objects for the client either so if there are any nested objects in this list it tries to move them, and throws an error in unity that you can only move root gameobjects.
Dont mean to sound too urgent but I think this may need to be fixed asap. thoughts?
The server/host moves the object just fine but client throws error
I think we will need 2 additional steps the check for DDOL objects, and check for nob.IsNested
SceneManager does check for nested
It won't move objects if they are not root, because unity does not allow it.
It doesn’t check for nested for the client, it’s the same part of the code that needs to check for isGlobal as well. Above I filed a bug on git. An error shows on the client saying “cannot move non root objects” on clients with nested nobs
Is that unitys error or fn
Unity error
GitHub
Two issues with this same section of code. See Discord Thread: https://discord.com/channels/424284635074134018/1057712730557132813 Suspect Code: /* Before unloading if !asServer and !asHost and rep...
Adding if (!nob.IsSceneObject && !nob.IsNested && !nob.IsGlobal) instead of just isSceneObject fixed both issues
It seems like we must not have people utilizing some of your advanced scene management features haha but in our game we are pushing them and finding all the bugs haha
I should specify that this is only for that section of code above which is for situations where ReplaceOption != none
Ah well be it unity catches it or fn
It's going to throw the same
FN is supposed to catch it though for a more detailed warning
Yeah that code block above just needs to add those checks or utilize a method you create for moving gameobjects to always check for those conditions.
It seems just a special use case block of code was created and just uses unities move objects function.
thats the only way to move them. I'll be sure to take a look, when Im able.
Sounds good, if you ever wanted to see the problem live or anything on a screen share or something just let me know.
Even when I do add the client-side checks nothing will change though.
The move still cannot occur.
What do you mean? Currently you are trying to move gameobjects that are nested, as well as moving DDOL objects.
I am saying you need to filter out nested objects and isGlobal objects and do not move them.
Also when I say Unity gives the error it also stops the callstack causing the game to stop. which is why I am considering it a pretty big bug even though it seems like it will be a simple fix haha.