Disable In Play Mode Attribute

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.

[Title("Disabled in play mode")]
[DisableInPlayMode]
public int A;

[DisableInPlayMode]
public Material B;