Improbable Icon

TransformSync Error

I uploaded GDK Currently installed version of the ‘spatial’ command-line tool: 20200714.120829.74df444bc9

Transform Sync not working after following https://documentation.improbable.io/gdk-for-unity/docs/transform-synchronization.

Gives me following error during runtime (no error in code)

[improbable.bridge.v3.async.workerlogging.WorkerLogMessageHandler] [UnityGameLogic-c613e1df:UnityGameLogic-c613e1df] NullReferenceException: Object reference not set to an instance of an object
Improbable.Gdk.TransformSynchronization.TransformSynchronization.OnEnable () (at Library/PackageCache/io.improbable.gdk.transformsynchronization@0.3.8/MonoBehaviours/TransformSynchronization.cs:60)
UnityEngine.Object:Instantiate(GameObject, Vector3, Quaternion)
Improbable.Gdk.GameObjectCreation.GameObjectCreatorFromMetadata:OnEntityCreated(SpatialOSEntityInfo, GameObject, EntityManager, EntityGameObjectLinker) (at Library/PackageCache/io.improbable.gdk.gameobjectcreation@0.3.8/GameObjectCreatorFromMetadata.cs:43)
Improbable.Gdk.GameObjectCreation.GameObjectInitializationSystem:<ProcessNewEntities>b__12_0(Entity, SpatialEntityId&, Component&) (at Library/PackageCache/io.improbable.gdk.gameobjectcreation@0.3.8/GameObjectInitializationSystem.cs:183)
Unity.Entities.EntityQueryBuilder:ForEach(F_EDD`2) (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/EntityQueryBuilder_ForEach.gen.cs:416)
Improbable.Gdk.GameObjectCreation.GameObjectInitializationSystem:ProcessNewEntities() (at Library/PackageCache/io.improbable.gdk.gameobjectcreation@0.3.8/GameObjectInitializationSystem.cs:152)
Improbable.Gdk.GameObjectCreation.GameObjectInitializationSystem:OnUpdate() (at Library/PackageCache/io.improbable.gdk.gameobjectcreation@0.3.8/GameObjectInitializationSystem.cs:122)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:134)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:114)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:134)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:114)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:134)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:114)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ScriptBehaviourUpdateOrder.cs:200)



NullReferenceException: Object reference not set to an instance of an object
Improbable.Gdk.TransformSynchronization.TransformSynchronization.OnEnable () (at Library/PackageCache/io.improbable.gdk.transformsynchronization@0.3.8/MonoBehaviours/TransformSynchronization.cs:60)
UnityEngine.Object:Instantiate(GameObject, Vector3, Quaternion)
Improbable.Gdk.GameObjectCreation.GameObjectCreatorFromMetadata:OnEntityCreated(SpatialOSEntityInfo, GameObject, EntityManager, EntityGameObjectLinker) (at Library/PackageCache/io.improbable.gdk.gameobjectcreation@0.3.8/GameObjectCreatorFromMetadata.cs:43)
Improbable.Gdk.GameObjectCreation.GameObjectInitializationSystem:<ProcessNewEntities>b__12_0(Entity, SpatialEntityId&, Component&) (at Library/PackageCache/io.improbable.gdk.gameobjectcreation@0.3.8/GameObjectInitializationSystem.cs:183)
Unity.Entities.EntityQueryBuilder:ForEach(F_EDD`2) (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/EntityQueryBuilder_ForEach.gen.cs:416)
Improbable.Gdk.GameObjectCreation.GameObjectInitializationSystem:ProcessNewEntities() (at Library/PackageCache/io.improbable.gdk.gameobjectcreation@0.3.8/GameObjectInitializationSystem.cs:152)
Improbable.Gdk.GameObjectCreation.GameObjectInitializationSystem:OnUpdate() (at Library/PackageCache/io.improbable.gdk.gameobjectcreation@0.3.8/GameObjectInitializationSystem.cs:122)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:134)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:114)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:134)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:114)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:134)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystemGroup.cs:114)
Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ComponentSystem.cs:108)
Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.9.1-preview.15/Unity.Entities/ScriptBehaviourUpdateOrder.cs:200)

Hello Henry,

From the screenshot you can see that the Transform Synchronization component is not being injected. This usually happens when there is an authority issue in your component (e.g.: A client requesting write access to a component to which the server is authoritative).

Double check the steps of the doc to ensure you have not missed anything.

H2H