浏览代码

Safer Toggle Active for state machines

/main
Thomas ICHÉ 5 年前
当前提交
4d7c7023
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
      Runtime/Ingredients/StateMachine/StateMachine.cs

8
Runtime/Ingredients/StateMachine/StateMachine.cs


public State CurrentState { get { return m_CurrentState; } }
State m_CurrentState;
private void OnValidate()
{
foreach(var state in States)
{
state.gameObject.SetActive(state == States.FirstOrDefault(o => o.StateName == DefaultState));
}
}
void Start()
{

正在加载...
取消
保存