[ComponentHeaderIcon]

Attribute used for adds a custom icon button to the component header that invokes a method.

Parameters

Parameter
Type
Description

Order

int

Order of the icon in the header. Lower values appear first.

Examples

public class MyComponent : MonoBehaviour
{
    [ComponentHeaderIcon]
    private void OnHeaderButtonClick()
    {
        Debug.Log("Header button clicked!");
    }
}

Last updated