Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IRenderPipelineGraphicsSettingsContextMenu<T>

Allows to modify the contextual menu of IRenderPipelineGraphicsSettings in the inspector.
Read time 1 minuteLast updated 10 days ago

Definition

Warning
Deprecated. IRenderPipelineGraphicsSettingsContextMenu\<T\> is deprecated and will be removed in a future release. Use IRenderPipelineGraphicsSettingsContextMenu2\<T\> instead. #from(6000.0)
public interface IRenderPipelineGraphicsSettingsContextMenu<T> : IRenderPipelineGraphicsSettingsContextMenu where T : class, IRenderPipelineGraphicsSettings

Examples

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); }}

Methods

Method

Description

PopulateContextMenuAllows to populate context menu with custom methods for your IRenderPipelineGraphicsSettings.

Inheritance