Odin has a dedicated attribute overview with examples

HideInPlayModeAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field)]
public class HideInPlayModeAttribute : Attribute, _Attribute

HideInPlayMode is used on any property, and hides the property when not in editor mode.

Use this when you only want a property to only be visible the editor.

  • System.Object
  • System.Attribute
  • HideInPlayModeAttribute

The following example shows how HideInPlayMode is used to hide a property when in play mode.

public class MyComponent : MonoBehaviour
	public int MyInt;


public HideInPlayModeAttribute()

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.