Exemplo n.º 1
0
        public override void OnEnable()
        {
            base.OnEnable();

            _layer = (StateLayer)target;

            if (_layer.Machine == null)
            {
                Type layerType = _layer.GetType();
                StateMachine machine = _layer.GetOrAddComponent<StateMachine>();
                StateMachineUtility.AddLayer(machine, layerType, machine);
            }
        }