Known Issues and Troubleshooting
Tips on how to handle common problems
Types missing the ExtensionOfNativeClass
attribute
ExtensionOfNativeClass
attributeReimport assets via menu item Assets / Reimport All
.
Scripts losing references to Prefabs, Fix Serialized Data button appears
There is a bug in some early versions of Unity 2022 LTS that causes Prefabs to be corrupted on reimport, leading to all sorts of issues like scripts losing references, or the CoherenceSync
component showing a button to "Fix Serialized Data" (which cures the problem, but only temporarily).
![](https://docs.coherence.io/~gitbook/image?url=https%3A%2F%2F352971571-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOnNWMLfYsbCzCnIbNrcP%252Fuploads%252FMZsQVzrXAPI4pPuzhlqw%252FFixSerializedData.png%3Falt%3Dmedia%26token%3Dec387686-62a3-4d1b-abf0-e48cd17538d2&width=768&dpr=4&quality=100&sign=1fd90171&sv=1)
The real solution is to upgrade to a newer version of Unity 2022. Unity claims they fixed the bug in version 2022.3.5f1
(note the specific patch number, .5
).
The Optimize window stops rendering components
The current workaround to avoid this issue is to open your CoherenceSync prefabs in prefab mode.
I can't see Rooms or Worlds
Check that all your clients are using the same Schema ID.
![](https://docs.coherence.io/~gitbook/image?url=https%3A%2F%2F352971571-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOnNWMLfYsbCzCnIbNrcP%252Fuploads%252FmA6KtRK0U6NAEWinefnM%252Fimage.png%3Falt%3Dmedia%26token%3D79914f86-a847-4e35-901c-6cc35ea3e20e&width=768&dpr=4&quality=100&sign=ebdf5a9d&sv=1)
Prefab Variants using excessive memory
When working with Prefab Variants, Unity leaks managed references (fields marked with [SerializeReference]
). This can make your prefab grow big and use more memory than necessary. Until Unity fixes this issue, we provide you with the ability to prune the leaked references. You can prune within the Configure window.
Binding is interpolated into correct position after instantiating
If you are instantiating a Prefab from a coherence event (such as a Command, OnValueSynced, OnStateAuthority, OnLiveQuerySynced...) and then changing its bindings in the same frame, the remote Clients will not instantly get updated values. Instead, if the binding has interpolation enabled, the value of the binding will be interpolated from the original value (from the instantiation step) to the updated value (from the change later in the frame).
The current recommended workaround is to make sure that the Prefab has initial values set before instantiation. Or in the case of position and rotation, those could be directly supplied to Instantiate()
instead of setting them later in the frame.
Source Generator Baking Strategy and CI setups
The source generator relies on an auto-generated configuration file to inject the baked code into Unity's Assembly-CSharp.dll. Such file will not be available on a fresh, non-cached project (i.e., no Library
), such as a Continuous Integration setup.
The SDK doesn't offer yet an API to initialize the source generator from code.
If you experience issues, switch to Assets strategy in your CI setup. You can keep using the source generator to develop locally, since either baking strategy can be used interchangeably, and the generated code is the same.
InvalidOperationException: Insecure connection not allowed
Make sure you allow HTTP connections in Editor to avoid InvalidOperationException: Insecure connection not allowed
errors. Find out how to enable HTTP connections in Unity's InsecureHttpOption article.
Last updated