[DisableInEditorMode]

Attribute disables the field when Unity is not in Play mode.

Examples

[DisableInEditorMode]
public float runtimeValue;

[DisableInEditorMode]
public int currentHealth;

Last updated