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 replacing scenes
* then move all non scene networked objects to the moved
* objects holder. Otherwise network objects would get destroyed
* on the scene change and never respawned if server doesn't
* have a reason to update visibility. */
if (!data.AsServer && !asHost && (replaceScenes != ReplaceOption.None))
{
Scene s = GetMovedObjectsScene();
foreach (NetworkObject nob in _networkManager.ClientManager.Objects.Spawned.Values)
{
if (!nob.IsSceneObject)
UnitySceneManager.MoveGameObjectToScene(nob.gameObject, s);
}
}
- !!!!Client doesn't consider Nested Objects before moving them into the MovedObjectsScene if replace option is not ReplaceOption.none!!!!!
- Host/Server Seems to handle the movement of nested nobs properly, however it breaks on the client and debugging seems to point to this section of code.
- Client doesn't consider DDOL objects before moving them into the MovedObjectsScene.
- This section of the method takes all Spawned Objects on the client and moves them into the moved object scene before deciding to keep them or not. Doesn't necessarily break anything but for organization there should be a check to keep objects in DDOL IMO.
Two issues with this same section of code.
See Discord Thread: https://discord.com/channels/424284635074134018/1057712730557132813
Suspect Code: