Version 2.1.11

Odin has a dedicated attribute overview with examples

InlineButtonAttribute 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 = true, Inherited = true)]
public sealed class InlineButtonAttribute : Attribute, _Attribute

The inline button adds a button to the end of a property.

  • System.Object
  • System.Attribute
  • InlineButtonAttribute


Due to a bug, multiple inline buttons are currently not supported.


The following examples demonstrates how InlineButton can be used.

public class MyComponent : MonoBehaviour
	// Adds a button to the end of the A property.
	public int A;

	// This is example demonstrates how you can change the label of the button.
	// InlineButton also supports refering to string members with $.
	[InlineButton("MyFunction", "Button")]
	public int B;

	private void MyFunction()
		// ...


InlineButtonAttribute(String, String)
Draws a button to the right of the property.
public InlineButtonAttribute(string memberMethod, string label = null)
System.String memberMethod

Name of member method to call when the button is clicked.

System.String label

Optional label of the button.


Optional label of the button.
public string Label { get; }
Name of member method to call when the button is clicked.
public string MemberMethod { get; }