Version 2.1.0.0

Odin has a dedicated attribute overview with examples

TypeInfoBoxAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)]
public class TypeInfoBoxAttribute : Attribute, _Attribute

The TypeInfoBox attribute adds an info box to the very top of a type in the inspector.

Use this to add an info box to the top of a class in the inspector, without having to use neither the PropertyOrder nor the OnInspectorGUI attribute.

Inheritance
  • System.Object
  • System.Attribute
  • TypeInfoBoxAttribute
Example

The following example demonstrates the use of the TypeInfoBox attribute.

[TypeInfoBox("This is my component and it is mine.")]
public class MyComponent : MonoBehaviour
{
    // Class implementation.
}

Constructors

TypeInfoBoxAttribute(String)
Draws an info box at the top of a type in the inspector.
public TypeInfoBoxAttribute(string message)
Parameters
System.String message

The message to display in the info box.

Fields

Message
The message to display in the info box.
public string Message

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.