|
|
|
|
|
|
using UnityEditor; |
|
|
|
using System; |
|
|
|
using GameplayIngredients.Comments.Editor; |
|
|
|
using UnityEditor.Overlays; |
|
|
|
using UnityEngine.UIElements; |
|
|
|
#if UNITY_2021_2_OR_NEWER
|
|
|
|
|
|
|
|
[Overlay(typeof(SceneView), "Toolbar", true)] |
|
|
|
public class IngredientsToolbarOverlay : Overlay |
|
|
|
{ |
|
|
|
public override VisualElement CreatePanelContent() |
|
|
|
{ |
|
|
|
return new Label("Toto"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#else
|
|
|
|
public delegate void SceneViewToolbarDelegate(SceneView sceneView); |
|
|
|
|
|
|
|
public static event SceneViewToolbarDelegate OnSceneViewToolbarGUI; |
|
|
|
|
|
|
{ |
|
|
|
SceneView.duringSceneGui += OnSceneGUI; |
|
|
|
|
|
|
|
SceneView.duringSceneGui += OnSceneGUI; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private static void OnSceneGUI(SceneView sceneView) |
|
|
|
|
|
|
toolbar = new GUIStyle(EditorStyles.inspectorFullWidthMargins); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif
|
|
|
|
} |
|
|
|
} |
|
|
|
|