Version 2.1.0.0

Odin has a dedicated attribute overview with examples

HideMonoScriptAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class HideMonoScriptAttribute : Attribute, _Attribute
Apply HideMonoScript to your class to prevent the Script property from being shown in the inspector.

This attribute has the same effect on a single type that the global configuration option "Show Mono Script In Editor" in "Preferences -> Odin Inspector -> General -> Drawers" has globally when disabled.

Inheritance
  • System.Object
  • System.Attribute
  • HideMonoScriptAttribute
Example

The following example shows how to use this attribute.

[HideMonoScript]
public class MyComponent : MonoBehaviour
{
    // The Script property will not be shown for this component in the inspector
}
See Also
  • System.Attribute

Constructors

HideMonoScriptAttribute()
public HideMonoScriptAttribute()