Hello,
I am currently migrating a project from MLAPI to Netcode. I was working through all the issues to make it work when I stumbled upon this Exception that I cannot figure out. It’s telling me that a client is trying to reparent an object, but to my knowledge, I don’t have any objects reparenting anything. I could really use some debugging suggestions for this topic.
NotServerException: Only the server can reparent NetworkObjects
UnityEngine.Debug:LogException(Exception)
Unity.Netcode.NetworkObject:OnTransformParentChanged() (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Core/NetworkObject.cs:658)
UnityEngine.Transform:SetParent(Transform, Boolean)
Unity.Netcode.NetworkSpawnManager:CreateLocalNetworkObject(Boolean, UInt32, UInt64, Nullable1, Nullable1, Nullable`1, Boolean) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Spawning/NetworkSpawnManager.cs:342)
Unity.Netcode.NetworkObject:AddSceneObject(SceneObject&, FastBufferReader, NetworkManager) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Core/NetworkObject.cs:1106)
Unity.Netcode.CreateObjectMessage:Handle(UInt64, FastBufferReader, NetworkManager) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Messaging/Messages/CreateObjectMessage.cs:26)
Unity.Netcode.CreateObjectMessage:Receive(FastBufferReader, NetworkContext&) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Messaging/Messages/CreateObjectMessage.cs:21)
Unity.Netcode.MessagingSystem:HandleMessage(MessageHeader&, FastBufferReader, UInt64, Single) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Messaging/MessagingSystem.cs:241)
Unity.Netcode.MessagingSystem:ProcessIncomingMessageQueue() (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Messaging/MessagingSystem.cs:260)
Unity.Netcode.NetworkManager:OnNetworkEarlyUpdate() (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Core/NetworkManager.cs:1144)
Unity.Netcode.NetworkManager:NetworkUpdate(NetworkUpdateStage) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Core/NetworkManager.cs:1115)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage(NetworkUpdateStage) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Core/NetworkUpdateLoop.cs:149)
Unity.Netcode.<>c:b__0_0() (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Core/NetworkUpdateLoop.cs:172)