com.alicizax.unity.animatio.../Runtime/Core/Property/GameObjectActive.cs

35 lines
802 B
C#
Raw Permalink Normal View History

2025-02-07 16:05:13 +08:00
using UnityEngine;
namespace AlicizaX.AnimationFlow.Runtime {
[Category("Property")]
public class GameObjectActive : ActionNode {
public GameObject target;
public bool active;
protected bool orgValue;
public override void OnInit() {
orgValue = target.activeSelf;
}
public override void OnReset() {
target.SetActive(orgValue);
}
public override void OnEnter() {
target.SetActive(active);
}
public override bool Valid() {
return target != null;
}
public override bool HasSubTitle() {
return true;
}
public override string SubTitle() {
return target != null ? target.name : null;
}
}
}