{
const string prefix = "IngredientsToolbarOverlay.";
public IngredientsToolbarOverlay() : base(
PlayFromHereButton.id,
LinkGameViewButton.id,
PointOfViewButton.id,
CommentsButton.id,
) { }
)
{ }
protected override Layout supportedLayouts => Layout.HorizontalToolbar | Layout.VerticalToolbar;
var m = new GenericMenu();
m.AddItem(new GUIContent("Link Camera"), LinkGameView.LockedSceneView == containerWindow as SceneView,
() => {
() =>
LinkGameView.CinemachineActive = true;
value = true;
UpdateIcon();
}
#endregion
static class Contents
public static Texture2D playFromHere;
ingredientsExplorer = EditorGUIUtility.Load("Packages/net.peeweek.gameplay-ingredients/Icons/Misc/ic-callable.png") as Texture2D;
[Overlay(typeof(SceneView), "Custom (Gameplay Ingredients)", true)]
public class IngredientsCustomToolbarOverlay : Overlay, IAccessContainerWindow
EditorWindow IAccessContainerWindow.containerWindow { get; set; }
SceneView sceneView => containerWindow as SceneView;
protected override Layout supportedLayouts => Layout.HorizontalToolbar;
public override VisualElement CreatePanelContent()
return new IMGUIContainer(() =>
using(new GUILayout.HorizontalScope(EditorStyles.toolbar))
SceneViewToolbar.OnSceneViewToolbarGUI?.Invoke(sceneView);
});
#if !UNITY_2021_2_OR_NEWER
public delegate void SceneViewToolbarDelegate(SceneView sceneView);
public static event SceneViewToolbarDelegate OnSceneViewToolbarGUI;
[InitializeOnLoadMethod]
static void Initialize()
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System;
using GameplayIngredients.Comments.Editor;
namespace GameplayIngredients.Editor
public static partial class SceneViewToolbar
fileFormatVersion: 2
guid: 74c6eb7f533b3f54499e30beb6d810d3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: