InlineButtonAttribute

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

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)384, AllowMultiple = True, Inherited = True)]
public sealed class InlineButtonAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.4.1

See Also

Example

The following examples demonstrates how InlineButton can be used.

public class MyComponent : MonoBehaviour
{
	// Adds a button to the end of the A property.
	[InlineButton("MyFunction")]
	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()
	{
		// ...
	}
}