DisableContextMenuAttribute

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.

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)384, AllowMultiple = False, Inherited = True)]
[DontApplyToListElementsAttribute]
public sealed class DisableContextMenuAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.5.0

See Also

Constructors

Definition Description
DisableContextMenuAttribute(bool, bool) Initializes a new instance of the DisableContextMenuAttribute class.

Properties

Return Type Definition Description
bool DisableForCollectionElements Whether to disable the context menu for collection elements.
bool DisableForMember Whether to disable the context menu for the member itself.

Example

The following example shows how DisableContextMenu is used on a property.

public class MyComponent : MonoBehaviour
{
	[DisableContextMenu]
	public Vector3 MyVector;
}