Files
plugin-library/Assets/02.InformationSave/RunTime/Extension/RectTransformInfoExtension.cs

18 lines
571 B
C#
Raw Normal View History

2025-03-26 09:34:52 +08:00
using UnityEngine;
namespace Stary.Evo.InformationSave
{
public static class RectTransformInfoExtension
{
public static RectTransformInfo.Information GetRectTransformInformation(this RectTransform rectTransform,
string desc)
{
return rectTransform.GetComponent<RectTransformInfo>()._list.Find(n => n.desc == desc);
}
public static void SetRectTransformInfo(this RectTransform rectTransform, string desc)
{
rectTransform.GetComponent<RectTransformInfo>().Set(desc);
}
}
}