#"Object is a prefab..." when stopping playmode.

7 messages · Page 1 of 1 (latest)

twin raven
#

Fishnet version : 4.3.7R.Pro

When using Yak, I'm getting a lot of Error: "{thing} is a prefab, . You must instantiate the prefab first, then use Spawn on the instantiated copy." when stopping playmode.

It seems to happen only on global objects, and is probably a race condition with unity unloading scenes when stopping playmode, causing networkObject.gameObject.scene to be null even though the object is not a prefab.

unreal crescent
#

Hi there, sorry for the delay. Are you still having this issue?

twin raven
#

Yes, here is the full error

PlayerState: Theo is a prefab. You must instantiate the prefab first, then use Spawn on the instantiated copy.
UnityEngine.Debug:LogError (object)
FishNet.Managing.Logging.LevelLoggingConfiguration:LogError (string) (at Assets/FishNet/Runtime/Managing/Logging/LevelLoggingConfiguration.cs:129)
FishNet.Managing.NetworkManager:InternalLogError (string) (at Assets/FishNet/Runtime/Managing/NetworkManager.Logging.cs:83)
FishNet.Managing.NetworkManagerExtensions:LogError (FishNet.Managing.NetworkManager,string) (at Assets/FishNet/Runtime/Managing/NetworkManager.Logging.cs:146)
FishNet.Managing.Server.ServerObjects:Despawn (FishNet.Object.NetworkObject,FishNet.Object.DespawnType,bool) (at Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs:840)
FishNet.Managing.Server.ServerManager:Despawn (FishNet.Object.NetworkObject,System.Nullable`1<FishNet.Object.DespawnType>) (at Assets/FishNet/Runtime/Managing/Server/ServerManager.QOL.cs:150)
FishNet.Managing.Server.ServerObjects:ClientDisconnected (FishNet.Connection.NetworkConnection) (at Assets/FishNet/Runtime/Managing/Server/Object/ServerObjects.cs:229)
#

FishNet.Managing.Server.ServerManager:Transport_OnRemoteConnectionState (FishNet.Transporting.RemoteConnectionStateArgs) (at Assets/FishNet/Runtime/Managing/Server/ServerManager.cs:613)
FishNet.Transporting.Multipass.Multipass:Multipass_OnRemoteConnectionState (FishNet.Transporting.RemoteConnectionStateArgs) (at Assets/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs:414)
FishNet.Transporting.Yak.Yak:HandleRemoteConnectionState (FishNet.Transporting.RemoteConnectionStateArgs) (at Assets/FishNet/Runtime/Plugins/Yak/Yak.cs:122)
FishNet.Transporting.Yak.Server.ServerSocket:OnLocalClientConnectionState (FishNet.Transporting.LocalConnectionState) (at Assets/FishNet/Runtime/Plugins/Yak/Core/ServerSocket.cs:159)
FishNet.Transporting.Yak.Client.ClientSocket:SetLocalConnectionState (FishNet.Transporting.LocalConnectionState,bool) (at Assets/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs:65)
FishNet.Transporting.Yak.Client.ClientSocket:StopConnection () (at Assets/FishNet/Runtime/Plugins/Yak/Core/ClientSocket.cs:81)
FishNet.Transporting.Yak.Yak:StopClient () (at Assets/FishNet/Runtime/Plugins/Yak/Yak.cs:337)
FishNet.Transporting.Yak.Yak:StopConnection (bool) (at Assets/FishNet/Runtime/Plugins/Yak/Yak.cs:260)
FishNet.Transporting.Yak.Yak:Shutdown () (at Assets/FishNet/Runtime/Plugins/Yak/Yak.cs:280)
FishNet.Transporting.Multipass.Multipass:OnDestroy () (at Assets/FishNet/Runtime/Transporting/Transports/Multipass/Multipass.cs:172)
unreal crescent
#

Ah ok I see, I'll ask FGG about the error stack trace to see if he knows what's going on

tardy thicket
#

@twin raven Id say your assessment is most likely correct.

#

Can maybe add an editor check in there to see if stopping