using Cysharp.Threading.Tasks; using PMaker.Extension; using Sirenix.OdinInspector; using System.Linq; using UnityEngine; public class GameobjectNameSetter : SetterBase { #if UNITY_EDITOR protected override void Set(Transform behaviour, string value) { behaviour.name = value; } [Button] public override void GetBehaviours() { behaviours = this.transform.Children().ToArray(); } [Button] public void GetCurrentValue() { var strs = this.behaviours.Select(_ => _.name); this.values = strs.ToArray(); this.SetDirty(); } #endif }