From b030411ae8fa339ba63ffb37abd69f02ef8f210b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E5=8D=B4?= <479813005@qq.com> Date: Wed, 27 Dec 2023 17:06:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Megumin.UnityPackage/Assets/TestAttribute.cs | 1 + .../Scripts/NewClass/Test/Matrix4x4Test.cs | 27 +++++++++++++++++++ .../NewClass/Test/Matrix4x4Test.cs.meta | 2 ++ 3 files changed, 30 insertions(+) create mode 100644 Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Test/Matrix4x4Test.cs create mode 100644 Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Test/Matrix4x4Test.cs.meta diff --git a/Megumin.UnityPackage/Assets/TestAttribute.cs b/Megumin.UnityPackage/Assets/TestAttribute.cs index e43d072..ad4f5b2 100644 --- a/Megumin.UnityPackage/Assets/TestAttribute.cs +++ b/Megumin.UnityPackage/Assets/TestAttribute.cs @@ -25,6 +25,7 @@ public class EnableTest [Enableable] public EnableTest EnableAttribut; + public Enable EnableClassInt; [Enum2String(typeof(LerpType))] public string Enum2String = LerpType.Lerp.ToString(); diff --git a/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Test/Matrix4x4Test.cs b/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Test/Matrix4x4Test.cs new file mode 100644 index 0000000..d432066 --- /dev/null +++ b/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Test/Matrix4x4Test.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using UnityEngine; + +namespace Megumin +{ + public class Matrix4x4Test : MonoBehaviour + { + [Editor] + public void Test() + { + var l2w = transform.localToWorldMatrix; + var w2l = transform.worldToLocalMatrix; + Debug.Log($"localToWorldMatrix \n{l2w}"); + Debug.Log($"worldToLocalMatrix \n{w2l}"); + var result1 = l2w * w2l; + var result2 = w2l * l2w; + var result3 = l2w.inverse == w2l; + var result4 = l2w == w2l.inverse; + Debug.Log($"{result1}\n ---- \n{result2}\n ---- \n{result3}\n ---- \n{result4}"); + } + } +} + + + diff --git a/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Test/Matrix4x4Test.cs.meta b/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Test/Matrix4x4Test.cs.meta new file mode 100644 index 0000000..e607dfb --- /dev/null +++ b/Megumin.UnityPackage/Packages/megumin.explosion4unity/Runtime/Scripts/NewClass/Test/Matrix4x4Test.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 09e56c42b096928419c8ab5b001d0c53 \ No newline at end of file