Namespace: | Sirenix.OdinInspector |
Assembly: | Sirenix.OdinInspector.Attributes |
[DontApplyToListElements]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All)]
[Conditional("UNITY_EDITOR")]
public class HideInEditorModeAttribute : Attribute, _Attribute
HideInEditorMode is used on any property, and hides the property when not in play mode.
Use this when you only want a property to only be visible play mode.
The following example shows how HideInEditorMode is used to hide a property when in the editor.
public class MyComponent : MonoBehaviour
{
[HideInEditorMode]
public int MyInt;
}
public HideInEditorModeAttribute()