Unity 6000.10f1, Coherence 1.2.3, I’ve seen this issue in WebGL builds as well as duplicate it in editor.
Recently we’ve been noticing a spamming error/warning that an entity already exists so it can’t map correctly followed by continues sync errors.
This is the warning:
13:47:22.672 (coherence) EntitiesManager: We can't add CoherenceSync 'Avatar(Clone) (Coherence.Toolkit.CoherenceSync)' to the mapper, because the EntityID 8 already exists.
Followed by a constant output of warnings:
13:47:22.722 (coherence) CoherenceSync: We can't find any binding for component '_6729567402c252b458093955ecbf4ba8_8202058734359604132' when receiving a component update.
The problem is that I don’t think we’ve changed anything related to how things are setup in scenes or how avatars are instantiated in the past month or so. We have added some new things to sync and updated the schema.
How are entity ids controlled? I’ve tried looking through the documentation thinking maybe how we move scenes could be an issue but like I said that hasn’t changed. Our setup has just 1 CoherenceBridge setup as the main bridge.
I’m able to reproduce this within the editor, and watching the ids when I move between rooms and scenes I’m not following how entity ids work. It seems like it has some default ids in the 33000 range, then I’m assuming it gets the livesync and updates the ids to values set by the replication server?
The replication steps seem to be:
Multiple users connect to our default scene which is setup as a world.
I have one player move to one scene then come back.
When the avatar spawns from coherence It takes the entity of something else already in the scene, in this case some static object to that scene.
I now get warning spam and the avatars don’t sync anymore.
This is a shot in the dark, but can you try going over the prefab instances that you have serialized in your scenes and try to revert overrides? And then check if the problem persists.
We have identified a bug today with overrides that might explain what is happening to you
Can you quickly skim over each prefab instance, and check if any has a vertical blue line next to the “x variables” text in the CoherenceSync inspector? If you see a vertical blue line it would mean you have undesired overrides to synced variables.
If you see any of these vertical blue lines next to “x variables” I believe you should be able to right click the line and revert those overrides specifically.
The overrides I’m talking about are wrongly autogenerated by coherence. If such overrides exist you will see them at the top of the inspector, where we list the amount of variables, methods etc that you’re syncing from this prefab.
The box just above that is cut off from your screenshot.
I might of found a solution I changed the Entity Resolution Priority:
From unique id to Asset id, could you explain what this setting does? I looked in the documentation and it only talks about the replacement strategy and not the entity resolution priority.
Thats there if you want full control in every client of how unique instances are instantiated (mostly for runtime instantiation), in your case, for instances serialized in the scene it shouldn’t be needed.
We will investigate more internally whats happening here and come back to you.