OnButtonEnter

This callback will be called when a radial button has been entered.

using UnityEngine;

public class RadialMenuEventExample : MonoBehaviour
{
    // BE SURE TO ASSIGN THIS IN THE INSPECTOR //
    public UltimateRadialMenu radialMenu;
    
    void Start ()
    {
        radialMenu.OnButtonEnter += ( buttonIndex ) =>
        {
            // Log into the console.
            Debug.Log( $"Input has entered button index: {buttonIndex}!" );
            
            // Additionally, you can access the UltimateRadialButtonList of the hovered button.
            Debug.Log( $"Button has the name: {radialMenu.UltimateRadialButtonList[ buttonIndex ].name}." );
        };
    }
}

Last updated