From e8ebfa150beb109e688c3f3cc5273fef743eb05d Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Sat, 10 Aug 2024 14:02:29 -0400 Subject: [PATCH] fix(Extensions): Added SetPositionAndRotation (#3887) --- Assets/Mirror/Core/Tools/Extensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) 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.