diff --git a/Assets/Mirror/Core/Tools/Extensions.cs b/Assets/Mirror/Core/Tools/Extensions.cs index 839481e2b..e9399b3a5 100644 --- a/Assets/Mirror/Core/Tools/Extensions.cs +++ b/Assets/Mirror/Core/Tools/Extensions.cs @@ -114,6 +114,18 @@ public static void SetPositionAndRotation(this Transform transform, Vector3 posi transform.position = position; transform.rotation = rotation; } + + public static void GetLocalPositionAndRotation(this Transform transform, out Vector3 position, out Quaternion rotation) + { + position = transform.localPosition; + rotation = transform.localRotation; + } + + public static void SetLocalPositionAndRotation(this Transform transform, Vector3 position, Quaternion rotation) + { + transform.localPosition = position; + transform.localRotation = rotation; + } #endif // IPEndPoint address only to pretty string.