Files
plugin-library/Assets/02.InformationSave/RunTime/Extension/ScaleExtension.cs
2025-03-26 09:34:52 +08:00

22 lines
601 B
C#

using UnityEngine;
namespace Stary.Evo.InformationSave
{
public static class ScaleExtension
{
public static Scale.Information GetScaleInformation(this Transform tf, string desc)
{
return tf.GetComponent<Scale>()._list.Find(n => n.desc == desc);
}
public static Vector3 GetScale(this Transform tf, string desc)
{
return GetScaleInformation(tf, desc).scale.SetVector3Data();
}
public static void SetScale(this Transform tf, string desc)
{
tf.GetComponent<Scale>().Set(desc);
}
}
}