From 2afbb545027568fccc85853e18af02a7c6b2929e Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Tue, 16 May 2023 16:03:51 +0800 Subject: *misc --- .../Assets/Scripts/Utils/TransformUtils.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 WorldlineKeepers/Assets/Scripts/Utils/TransformUtils.cs (limited to 'WorldlineKeepers/Assets/Scripts/Utils/TransformUtils.cs') diff --git a/WorldlineKeepers/Assets/Scripts/Utils/TransformUtils.cs b/WorldlineKeepers/Assets/Scripts/Utils/TransformUtils.cs new file mode 100644 index 0000000..dcfb8c9 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Utils/TransformUtils.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace WK +{ + + public static class TransformUtils + { + public static void ResetLocal(this Transform transform) + { + transform.localPosition = Vector3.zero; + transform.localRotation = Quaternion.identity; + transform.localScale = Vector3.one; + } + } + +} -- cgit v1.1-26-g67d0