Odin has a dedicated attribute overview with examples

InlineButtonAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, 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; }

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.