Description, details and error message(s)
I just upgraded to 1.3.1. Everything seems to work except when connecting to Cloud and creating entities, a bug occurs as seen in screenshot.
This does not occur when connected to local RS.
I also found that if I enable Project Settings > Editor > Reload Domain, this error does not occur, so I’m guessing its related to a static property that does not get cleared.
11:56:52.335 (coherence) EntitiesManager: OnNetworkEntityCreatedInvoke exception in handler: UnityEngine.MissingReferenceException: The object of type 'CoroutineRunner' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
at (wrapper managed-to-native) UnityEngine.MonoBehaviour.IsObjectMonoBehaviour(UnityEngine.Object)
at UnityEngine.MonoBehaviour.StartCoroutine (System.Collections.IEnumerator routine) [0x00014] in <17484a9af6b944dea5cd9be4dbb0da2c>:0
at Coherence.Toolkit.CoroutineRunner.StartCoroutine (System.Collections.IEnumerator coroutine) [0x00000] in .\Library\PackageCache\io.coherence.sdk@1.3.1\Coherence.Toolkit\CoroutineRunner.cs:20
at Coherence.Toolkit.EntitiesManager.PostNetworkEntityCreationActions (Coherence.Toolkit.NetworkEntityState state) [0x00010] in .\Library\PackageCache\io.coherence.sdk@1.3.1\Coherence.Toolkit\NetworkManager\EntitiesManager.cs:965
UnityEngine.Debug:LogError (object,UnityEngine.Object)
Coherence.Log.Targets.UnityConsoleTarget:Log (Coherence.Log.LogLevel,string,System.ValueTuple`2<string, object>[],Coherence.Log.Logger) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Log/LogTargets/UnityConsoleTarget.cs:86)
Coherence.Log.Logger:BuildAndPrintLog (Coherence.Log.LogLevel,string,System.ValueTuple`2<string, object>[]) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Log/Logger.cs:72)
Coherence.Log.Logger:LogImpl (Coherence.Log.LogLevel,string,System.ValueTuple`2<string, object>[]) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Log/Logger.cs:224)
Coherence.Log.Logger:Error (string,System.ValueTuple`2<string, object>[]) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Log/Logger.cs:170)
Coherence.Log.UnityLogger:Error (string,System.ValueTuple`2<string, object>[]) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Log/UnityLogger.cs:102)
Coherence.Toolkit.EntitiesManager:PostNetworkEntityCreationActions (Coherence.Toolkit.NetworkEntityState) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/NetworkManager/EntitiesManager.cs:972)
Coherence.Toolkit.EntitiesManager:InstantiateCoherenceSync (Coherence.Toolkit.ICoherenceSync,Coherence.Toolkit.SpawnInfo,Coherence.Toolkit.NetworkEntityState) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/NetworkManager/EntitiesManager.cs:910)
Coherence.Toolkit.EntitiesManager:InstantiateNetworkedEntity (Coherence.Toolkit.ICoherenceSync,Coherence.Toolkit.SpawnInfo,Coherence.Entities.Entity,Coherence.Entities.IncomingEntityUpdate) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/NetworkManager/EntitiesManager.cs:859)
Coherence.Toolkit.EntitiesManager/<>c__DisplayClass55_0:<CreateNetworkedEntity>b__0 (Coherence.Toolkit.ICoherenceSync) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/NetworkManager/EntitiesManager.cs:652)
Coherence.Toolkit.DirectReferenceProvider:LoadAsset (string,System.Action`1<Coherence.Toolkit.ICoherenceSync>) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/CoherenceSyncConfigs/ObjectProviders/DirectReferenceProvider.cs:17)
Coherence.Toolkit.CoherenceClientConnectionManager:GetPrefab (Coherence.Connection.ClientID,Coherence.Connection.ConnectionType,System.Action`1<Coherence.Toolkit.ICoherenceSync>) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/CoherenceClientConnectionManager.cs:115)
Coherence.Toolkit.EntitiesManager:CreateNetworkedEntity (Coherence.Entities.Entity,Coherence.Entities.IncomingEntityUpdate,bool&) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/NetworkManager/EntitiesManager.cs:647)
Coherence.Toolkit.EntitiesManager:<SetClient>b__50_0 (Coherence.Entities.Entity,Coherence.Entities.IncomingEntityUpdate) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/NetworkManager/EntitiesManager.cs:524)
Coherence.Core.ClientCore:HandleReceivedCreate (Coherence.Entities.IncomingEntityUpdate&) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Core/ClientCore.cs:735)
Coherence.Core.ClientCore:OnEntityUpdates (System.Collections.Generic.List`1<Coherence.Entities.IncomingEntityUpdate>) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Core/ClientCore.cs:691)
Coherence.Core.InConnection:<.ctor>b__27_0 (System.Collections.Generic.List`1<Coherence.Entities.IncomingEntityUpdate>) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Core/InConnection.cs:53)
Coherence.Core.Channels.InNetworkChannel:FlushBuffer (System.Collections.Generic.IReadOnlyCollection`1<Coherence.Entities.Entity>) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Core/Channels/InNetworkChannel.cs:82)
Coherence.Core.InConnection:FlushChangeBuffer () (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Core/InConnection.cs:174)
Coherence.Core.InConnection:ProcessIncomingPacket (Coherence.Brook.IInOctetStream) (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Core/InConnection.cs:112)
Coherence.Core.ClientCore:ReceiveAndProcessPackets () (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Core/ClientCore.cs:419)
Coherence.Core.ClientCore:UpdateReceiving () (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Core/ClientCore.cs:408)
Coherence.Toolkit.CoherenceBridge:ReceiveFromNetworkAndUpdateTime () (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/CoherenceBridge.cs:990)
Coherence.Toolkit.CoherenceBridge:ReceiveFromNetwork () (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/CoherenceBridge.cs:887)
Coherence.Toolkit.PlayerLoop.CoherenceLoop/CoherenceReceiver:ReceiveFromNetwork () (at ./Library/PackageCache/io.coherence.sdk@1.3.1/Coherence.Toolkit/PlayerLoop/CoherenceLoop.cs:310)
Screenshots
How to reproduce
Every entity that’s created when connected to Cloud produces this error for me.
Environment
SDK: 1.3.1
Unity: 2022.3
OS/Platform: Win10