OnMenuDisabled

This callback is called when the Ultimate Radial Menu has been disabled.

In the example below, the current button that is being hovered will be interacted with when disabling the menu.

using UnityEngine;

public class RadialMenuEventExample : MonoBehaviour
{
    // BE SURE TO ASSIGN THIS IN THE INSPECTOR //
    public UltimateRadialMenu radialMenu;
    
    void Start ()
    {
        radialMenu.OnMenuDisabled += () =>
        {
            // If there is no current hovered button then just return.
	    if( radialMenu.CurrentButtonIndex < 0 )
	        return;
	    
	    // Check any other conditional here.
	    
	    // Interact with the current hovered button.
	    radialMenu.UltimateRadialButtonList[ radialMenu.CurrentButtonIndex ].OnInteract();
        };
    }
}

Last updated

Was this helpful?