/************************************************************************************************************************/ /// <summary> /// Draws the root `property` GUI and calls <see cref="DoPropertyGUI"/> for each of its children. /// </summary> public override void OnGUI(Rect area, SerializedProperty property, GUIContent label) { InitialiseMode(property); using (TransitionContext.Get(this, property)) { var isPreviewing = TransitionPreviewWindow.IsPreviewingCurrentProperty(); if (isPreviewing) { EditorGUI.DrawRect(area, new Color(0.35f, 0.5f, 1, 0.2f)); } float headerHeight; DoHeaderGUI(area, property, label, isPreviewing, out headerHeight); DoChildPropertiesGUI(area, headerHeight, property); } }
/************************************************************************************************************************/ /// <summary> /// Draws the root `property` GUI and calls <see cref="DoPropertyGUI"/> for each of its children. /// </summary> public override void OnGUI(Rect area, SerializedProperty property, GUIContent label) { InitialiseMode(property); using (TransitionContext.Get(this, property)) { // Highlight the area if this transition is currently being previewed. var isPreviewing = TransitionPreviewWindow.IsPreviewingCurrentProperty(); if (isPreviewing) { var highlightArea = area; highlightArea.xMin -= AnimancerGUI.IndentSize; EditorGUI.DrawRect(highlightArea, new Color(0.35f, 0.5f, 1, 0.2f)); } float headerHeight; DoHeaderGUI(area, property, label, isPreviewing, out headerHeight); DoChildPropertiesGUI(area, headerHeight, property); } }