DisableInEditorModeAttribute

DisableInEditorMode is used on any property, and disables the property when not in play mode.

Use this when you only want a property to be editable when in play mode.

namespace Sirenix.OdinInspector
{
[DontApplyToListElementsAttribute]
[AttributeUsageAttribute((AttributeTargets)448)]
public class DisableInEditorModeAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.4.1

See Also

Example

The following example shows how DisableInEditorMode is used to disable a property when in the editor.

public class MyComponent : MonoBehaviour
{
	[DisableInEditorMode]
	public int MyInt;
}