public void StartChildStateControl(eStateId defaultStateId) { _childControl = gameObject.GetComponent <StateControl>(); if (_childControl == null) { _childControl = gameObject.AddComponent <StateControl>(); } _childControl.enabled = true; _childControl.IsChildControl = true; _childControl.SetCurState(defaultStateId); }