interface in UnityEditor.Rendering
Implements interfaces:IRenderPipelineGraphicsSettingsContextMenu
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
CloseAllows 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. |