Utility/TransformExtension.cs
@@ -147,6 +147,23 @@ return false; } [XLua.LuaCallCSharp] public static void SetPosition(this Transform transform, float x, float y, float z, bool isLocal = false) { if (transform == null) { return; } if (isLocal) { transform.localPosition = new Vector3(x, y, z); } else { transform.position = new Vector3(x, y, z); } } public static Transform GetRoot(this Transform transform) {