DisableInPlayModeAttribute

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

Use this to prevent users from editing a property when in play mode.

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

Requirements

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

See Also

Example

The following example shows how DiableInPlayMode is used to disable a property when in play mode.

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