TeleportToPosition throws NullPointerException
Options
Hi, i have an error and i don't know what i'm doing wrong
NullReferenceException: Object reference not set to an instance of an object Fusion.NetworkPosition.SetEnginePosition (UnityEngine.Vector3 pos) (at Fusion/Fusion.Runtime/Components/TransformBehaviours/NetworkPosition.Logic.cs:154) Fusion.NetworkTransform.TeleportToPositionRotation (UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, System.Nullable`1[T] interpolationVel, System.Nullable`1[T] interpolationAngularVel, System.Boolean interpolateBackwards) (at Fusion/Fusion.Runtime/Components/TransformBehaviours/NetworkTransform.Logic.cs:205)
It appears when i use NetworkTransform.TeleportToPosition or NetworkTransform.TeleportToPositionAndRotation go: a GameObject
go.GetComponent<NetworkTransform>().TeleportToPositionRotation(Vector3.zero, Quaternion.identity);
0
Best Answer
-
I solve it... Aparently the GameObject that contains the networkObject and the networkTransform must be active in hierarchy.
0
Answers
-
I solve it... Aparently the GameObject that contains the networkObject and the networkTransform must be active in hierarchy.
0