예제 #1
0
        public void Enable()
        {
            if (!OTIEditorUtility.Instance)
            {
                OTIEditorUtility AIE = ScriptableObject.CreateInstance <OTIEditorUtility>();
                OTIEditorUtility.Instance = AIE;
            }

            EditorFormat = OTIEditorFormat._ReturnSet(this, "The component that factors into this behavior's cost during decision making");
            setFormats();
        }
예제 #2
0
        private void OnEnable()
        {
            instance = target as WorldMonitors;

            maxNumberTrackedFields = show.Length;
            numberTrackedFields    = Mathf.Max(1, numberTrackedFields);

            if (instance.TrackedObjects.Count == 0)
            {
                instance.TrackedObjects.Add(new TrackedObjectContainer());
            }

            base.Enable();
            if (!OTIEditorUtility.Instance)
            {
                OTIEditorUtility AIE = ScriptableObject.CreateInstance <OTIEditorUtility>();
                OTIEditorUtility.Instance = AIE;
            }

            serializedObject.ApplyModifiedProperties();
        }