Version 3.3.1.2

Odin has a dedicated attribute overview with examples

RequiredInAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[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, AllowMultiple = false, Inherited = true)]
[Conditional("UNITY_EDITOR")]
public class RequiredInAttribute : Attribute, _Attribute
Makes a member required based on which type of a prefab and instance it is in.
Inheritance
  • System.Object
  • System.Attribute
  • RequiredInAttribute

Constructors

RequiredInAttribute(PrefabKind)
public RequiredInAttribute(PrefabKind kind)
Parameters
PrefabKind kind

Fields

ErrorMessage
public string ErrorMessage
PrefabKind
public PrefabKind PrefabKind