/************************************************************************************************************************/ /// <summary> /// Adds a new port and uses <see cref="AnimancerState.SetParent"/> to connect the `state` to it. /// </summary> public void AddChild(AnimancerState state) { if (state.Parent == this) { return; } var index = States.Count; States.Add(null); _Playable.SetInputCount(index + 1); state.SetParent(this, index); }
/************************************************************************************************************************/ /// <summary> /// Adds a new port and uses <see cref="AnimancerState.SetParent"/> to connect the `state` to it. /// </summary> public void AddChild(AnimancerState state) { if (state.Parent == this) { return; } state.SetRoot(Root); var index = States.Count; States.Add(null);// OnAddChild will assign the state. _Playable.SetInputCount(index + 1); state.SetParent(this, index); }