Skip to content

Button Horiaontal Group

[ButtonHorizontalGroup] attribute used for layout button in horizontal group.


Support Types

Any types.


Parameters

Parameter Name Description
Name Name of group

Examples

[Button]
[ButtonHorizontalGroup("Functions")]
public void FirstFunction()
{
    // FirstFunction code...
}

[Button]
[ButtonHorizontalGroup("Functions")]
public void SecondFunction()
{
    // SecondFunction code...
}
Note

Make sure that you have added ApexInspector namespace in your script, to get access to all attributes.

using ApexInspector;


Demo

using ApexInspector;
using UnityEngine;

public class ExampleComponent : MonoBehaviour
{
    public float value;

    [Button]
    [ButtonHorizontalGroup("Functions")]
    public void FirstFunction()
    {
        Debug.Log("Called First Function!");
    }

    [Button]
    [ButtonHorizontalGroup("Functions")]
    public void SecondFunction()
    {
        Debug.Log("Called Second Function!");
    }
}

Live-demo

Live demo