interface in UnityEditor.Rendering
Implements interfaces:IRenderPipelineGraphicsSettingsContextMenu
Allows to modify the contextual menu of IRenderPipelineGraphicsSettings in the inspector.
using UnityEditor; using UnityEditor.Rendering; using UnityEngine.UIElements;
struct DummyAMenu : IRenderPipelineGraphicsSettingsContextMenu<DummyA> { public int priority => 0;
static void Increment(DummyA a) => a.myInt++;
public void PopulateContextMenu(DummyA setting, PropertyDrawer _, ref GenericDropdownMenu menu) { if (!EditorApplication.isPlaying) menu.AddItem("Try Increment", false, () => Increment(setting)); else menu.AddDisabledItem("Try Increment", false); } }
PopulateContextMenu | Allows to populate context menu with custom methods for your IRenderPipelineGraphicsSettings. |