diff --git a/Assets/Mirror/Core/Tools/Extensions.cs b/Assets/Mirror/Core/Tools/Extensions.cs index cd29a2a6e..601394e22 100644 --- a/Assets/Mirror/Core/Tools/Extensions.cs +++ b/Assets/Mirror/Core/Tools/Extensions.cs @@ -108,6 +108,12 @@ public static void GetPositionAndRotation(this Transform transform, out Vector3 position = transform.position; rotation = transform.rotation; } + + public static void SetPositionAndRotation(this Transform transform, Vector3 position, Quaternion rotation) + { + transform.position = position; + transform.rotation = rotation; + } #endif // IPEndPoint address only to pretty string.