/************************************************************************************************************************/ /// <summary> /// Called by the Unity editor to draw the custom inspector GUI elements. /// </summary> public override void OnInspectorGUI() { // Normally the targets wouldn't change after OnEnable, but the trick AnimancerComponent.Reset uses to // swap the type of an existing component when a new one is added causes the old target to be destroyed. GatherTargets(); serializedObject.Update(); _AnimatorEditor.DoInspectorGUI(); DoOtherFieldsGUI(); DoStatesGUI(); serializedObject.ApplyModifiedProperties(); }
/************************************************************************************************************************/ /// <summary> /// Called by the Unity editor to draw the custom Inspector GUI elements. /// </summary> public override void OnInspectorGUI() { // Normally the targets wouldn't change after OnEnable, but the trick AnimancerComponent.Reset uses to // swap the type of an existing component when a new one is added causes the old target to be destroyed. GatherTargets(); serializedObject.Update(); var area = GUILayoutUtility.GetRect(0, 0); _AnimatorEditor.DoInspectorGUI(); DoOtherFieldsGUI(); PlayableDrawer.DoGUI(_Targets); area.yMax = GUILayoutUtility.GetLastRect().yMax; AnimancerLayerDrawer.HandleDragAndDropAnimations(area, _Targets[0], 0); serializedObject.ApplyModifiedProperties(); }