28 lines
513 B
C#
28 lines
513 B
C#
using Cysharp.Threading.Tasks;
|
|
|
|
using PMaker.Extension;
|
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
using System.Linq;
|
|
|
|
using TMPro;
|
|
|
|
public class TMPTextSetter : SetterBase<TextMeshProUGUI, string>
|
|
{
|
|
#if UNITY_EDITOR
|
|
protected override void Set(TextMeshProUGUI behaviour, string value)
|
|
{
|
|
behaviour.text = value;
|
|
}
|
|
|
|
[Button]
|
|
public void GetCurrentValue()
|
|
{
|
|
var strs = this.behaviours.Select(_ => _.text);
|
|
this.values = strs.ToArray();
|
|
this.SetDirty();
|
|
}
|
|
#endif
|
|
}
|