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(); }
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(); }