Hi, I’m experiencing a few problems when trying to play on a windows build. Basically I have the following setup:
-
Using Rooms.
-
When all players are connected, I set a few [Sync] variables to share the saved information of all connected players (only once). In editor, this is working fine, but in the build they aren’t in sync.
-
I have tried to delete the baked folder and bake the scripts again, but the error persists.
Setting the Coherence log to debug and info we get the following:
Player.log
[...]
12:12:43.046 (coherence) CoherenceSync: Couldn't load baked script for '[REMOVED](Clone)' (type 'Coherence.Generated.CoherenceSync[REMOVED]_4299c6ae792d7e746b5c7f48af6d2ea5, Assembly-CSharp'). Falling back to reflection.
UnityEngine.Logger:Log(LogType, Object, Object)
UnityEngine.Debug:LogWarning(Object, Object)
Coherence.Log.Targets.UnityConsoleTarget:Log(LogLevel, String, ValueTuple`2[], Logger)
Coherence.Log.Logger:BuildAndPrintLog(LogLevel, String, ValueTuple`2[])
Coherence.Log.Logger:LogImpl(LogLevel, String, ValueTuple`2[])
Coherence.Log.UnityLogger:Warning(String, ValueTuple`2[])
Coherence.Toolkit.CoherenceSync:UpdateBakedScriptReference()
Coherence.Toolkit.CoherenceSync:Awake()
UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)
Coherence.Toolkit.DefaultInstantiator:Instantiate(SpawnInfo)
Coherence.Toolkit.EntitiesManager:InstantiateCoherenceSync(ICoherenceSync, SpawnInfo, NetworkEntityState)
Coherence.Toolkit.EntitiesManager:InstantiateNetworkedEntity(ICoherenceSync, SpawnInfo, Entity, EntityUpdate)
Coherence.Toolkit.<>c__DisplayClass50_0:<CreateNetworkedEntity>b__0(ICoherenceSync)
Coherence.Toolkit.EntitiesManager:CreateNetworkedEntity(Entity, EntityUpdate, Boolean&)
Coherence.Toolkit.EntitiesManager:<SetClient>b__45_0(Entity, EntityUpdate)
Coherence.Core.ClientCore:HandleReceivedCreate(EntityUpdate&)
Coherence.Core.ClientCore:OnEntityUpdates(List`1)
Coherence.Core.InConnection:FlushChangeBuffer()
Coherence.Core.InConnection:ProcessIncomingPacket(IInOctetStream, AbsoluteSimulationFrame)
Coherence.Core.ClientCore:ReceiveAndProcessPackets()
Coherence.Toolkit.CoherenceBridge:ReceiveFromNetworkAndUpdateTime()
Coherence.Toolkit.PlayerLoop.CoherenceReceiver:ReceiveFromNetwork()
12:12:43.046 (coherence) CoherenceSyncUpdater: We can only synchronize 1 variables of type Byte[] on the same game object when using reflection. This binding will not be synced: [REMOVED]. Try switching to 'Use baked scripts' in the inspector.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Coherence.Log.Targets.UnityConsoleTarget:Log(LogLevel, String, ValueTuple`2[], Logger)
Coherence.Log.Logger:BuildAndPrintLog(LogLevel, String, ValueTuple`2[])
Coherence.Log.Logger:LogImpl(LogLevel, String, ValueTuple`2[])
Coherence.Log.UnityLogger:Warning(String, ValueTuple`2[])
Coherence.Toolkit.CoherenceSyncUpdater:MapGenericPool()
Coherence.Toolkit.CoherenceSync:ConnectToBridge()
Coherence.Toolkit.CoherenceSync:OnEnable()
UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)
Coherence.Toolkit.DefaultInstantiator:Instantiate(SpawnInfo)
Coherence.Toolkit.EntitiesManager:InstantiateCoherenceSync(ICoherenceSync, SpawnInfo, NetworkEntityState)
Coherence.Toolkit.EntitiesManager:InstantiateNetworkedEntity(ICoherenceSync, SpawnInfo, Entity, EntityUpdate)
Coherence.Toolkit.<>c__DisplayClass50_0:<CreateNetworkedEntity>b__0(ICoherenceSync)
Coherence.Toolkit.EntitiesManager:CreateNetworkedEntity(Entity, EntityUpdate, Boolean&)
Coherence.Toolkit.EntitiesManager:<SetClient>b__45_0(Entity, EntityUpdate)
Coherence.Core.ClientCore:HandleReceivedCreate(EntityUpdate&)
Coherence.Core.ClientCore:OnEntityUpdates(List`1)
Coherence.Core.InConnection:FlushChangeBuffer()
Coherence.Core.InConnection:ProcessIncomingPacket(IInOctetStream, AbsoluteSimulationFrame)
Coherence.Core.ClientCore:ReceiveAndProcessPackets()
Coherence.Toolkit.CoherenceBridge:ReceiveFromNetworkAndUpdateTime()
Coherence.Toolkit.PlayerLoop.CoherenceReceiver:ReceiveFromNetwork()
[...]
This is the coherence sync component:
I’m not sure why this is happening since at first glance, everything looks ok.
Appreciate any help to understand why the baked scripts can’t be loaded and how to switch to ‘Use baked scripts’ in the inspector.
Let me know if you need any extra details.
Thanks.