private void OnEnable()
        {
            M = (MAnimalAIControl)target;
            //script = MonoScript.FromMonoBehaviour(M);

            agent  = serializedObject.FindProperty("agent");
            animal = serializedObject.FindProperty("animal");



            OnTargetSet             = serializedObject.FindProperty("OnTargetSet");
            OnTargetArrived         = serializedObject.FindProperty("OnTargetArrived");
            OnTargetPositionArrived = serializedObject.FindProperty("OnTargetPositionArrived");
            stoppingDistance        = serializedObject.FindProperty("stoppingDistance");
            walkDistance            = serializedObject.FindProperty("walkDistance");
            targett                 = serializedObject.FindProperty("target");
            AutoNextTarget          = serializedObject.FindProperty("AutoNextTarget");
            AutoInteract            = serializedObject.FindProperty("AutoInteract");
            debugGizmos             = serializedObject.FindProperty("debugGizmos");
            debug                   = serializedObject.FindProperty("debug");
            Editor_Tabs1            = serializedObject.FindProperty("Editor_Tabs1");
            UpdateTargetPosition    = serializedObject.FindProperty("updateTargetPosition");
            MoveAgentOnMovingTarget = serializedObject.FindProperty("MoveAgentOnMovingTarget");
            MovingTargetInterval    = serializedObject.FindProperty("MovingTargetInterval");
            LookAtTargetOnArrival   = serializedObject.FindProperty("LookAtTargetOnArrival");
        }
Exemple #2
0
        private void OnEnable()
        {
            M      = (MAnimalAIControl)target;
            script = MonoScript.FromMonoBehaviour(M);

            stoppingDistance = serializedObject.FindProperty("stoppingDistance");
            walkDistance     = serializedObject.FindProperty("walkDistance");
        }