Files
2025-03-26 09:34:52 +08:00

22 lines
655 B
C#

using UnityEngine;
namespace Stary.Evo.InformationSave
{
public static class EulerAnglesExtension
{
public static EulerAngles.Information GetEulerAnglesInformation(this Transform tf, string desc)
{
return tf.GetComponent<EulerAngles>()._list.Find(n => n.desc == desc);
}
public static Vector3 GetEulerAngles(this Transform tf, string desc)
{
return GetEulerAnglesInformation(tf, desc).eulerAngles.SetVector3Data();
}
public static void SetEulerAngles(this Transform tf, string desc)
{
tf.GetComponent<EulerAngles>().Set(desc);
}
}
}