22 lines
673 B
C#
22 lines
673 B
C#
using UnityEngine;
|
|
|
|
namespace Stary.Evo.InformationSave
|
|
{
|
|
public static class LocalPositionExtension
|
|
{
|
|
public static LocalPosition.Information GetLocalPositionInformation(this Transform tf, string desc)
|
|
{
|
|
return tf.GetComponent<LocalPosition>()._list.Find(n => n.desc == desc);
|
|
}
|
|
|
|
public static Vector3 GetLocalPosition(this Transform tf, string desc)
|
|
{
|
|
return GetLocalPositionInformation(tf, desc).localPosition.SetVector3Data();
|
|
}
|
|
|
|
public static void SetLocalPosition(this Transform tf, string desc)
|
|
{
|
|
tf.GetComponent<LocalPosition>().Set(desc);
|
|
}
|
|
}
|
|
} |