Namespace: | Sirenix.OdinInspector |
Assembly: | Sirenix.OdinInspector.Attributes |
[DontApplyToListElements]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All, AllowMultiple = false, Inherited = true)]
[Conditional("UNITY_EDITOR")]
public sealed class DisableContextMenuAttribute : Attribute, _Attribute
DisableContextMenu is used on any property and disables the context menu for that property.
Use this if you do not want the context menu to be available for a property.
The following example shows how DisableContextMenu is used on a property.
public class MyComponent : MonoBehaviour
{
[DisableContextMenu]
public Vector3 MyVector;
}
public DisableContextMenuAttribute(bool disableForMember = true, bool disableCollectionElements = false)
System.Boolean | disableForMember | Whether to disable the context menu for the member itself. |
System.Boolean | disableCollectionElements | Whether to also disable the context menu of collection elements. |
public bool DisableForCollectionElements
public bool DisableForMember