⚪
Tank & Healer Studio Assets
Return to Website
Ultimate Radial Menu
Ultimate Radial Menu
  • 🔵INTRODUCTION
    • 👋Welcome!
    • ⚡Getting Started
    • 📺Video Tutorials
  • 📖Documentation
    • UltimateRadialMenu
      • Public Methods
        • RegisterButton (+3 overloads)
        • Enable
        • Disable
        • DisableImmediate
        • CreateEmptyButton
        • ClearMenu
        • RemoveButton
        • ClearButtonInformation
        • SetPosition
        • ResetPosition
        • SetParent
        • UpdatePositioning
      • Static Methods
        • ReturnComponent
        • RegisterButton (+3 overloads)
        • Enable
        • Disable
        • DisableImmediate
        • CreateEmptyButton
        • ClearMenu
        • RemoveButton
        • ClearButtonInformation
        • SetPosition
        • ResetPosition
        • SetParent
      • Events
        • OnButtonEnter
        • OnMenuDisabled
      • Public Classes
        • UltimateRadialButton
      • Properties
    • UltimateRadialButtonInfo
      • Public Methods
        • UpdateIcon
        • UpdateText
        • UpdateDescription
        • SelectButton
        • DeselectButton
        • ToggleSelect
        • EnableButton
        • DisableButton
        • RemoveFromMenu
        • RemoveInfoFromButton
        • GetButtonIndex
      • Leave us a review!
    • UltimateRadialMenuInputManager
      • Public Methods
        • SendRaycastInput
  • 💡Tips & Tricks
    • Creating a Custom Input Manager
    • Sub Menu Add-on
  • 🤝Helpful Links
    • Support Discord
    • Other Products
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. UltimateRadialButtonInfo
  3. Public Methods

GetButtonIndex

Returns the index of the button that this information is associated with in the list of buttons currently on the radial menu.

using UnityEngine;

public class RadialButtonInfoExample : MonoBehaviour
{
	// BE SURE TO ASSIGN THIS IN THE INSPECTOR //
	public UltimateRadialMenu radialMenu;
	public UltimateRadialButtonInfo buttonInfo;

	void Start ()
	{
		// Register the button to the menu.
		radialMenu.RegisterButton( MyCallback, buttonInfo );
		
		// After the button info has been registered get the index of this information by calling the GetButtonIndex function.
		int buttonIndex = buttonInfo.GetButtonIndex();
		
		// Now you can do anything you need with the UltimateRadialButtonList on the radial menu by referencing this index.
	}
	
	void MyCallback ()
	{
		Debug.Log( "MyCallback" );
	}
}
PreviousRemoveInfoFromButtonNextUltimateRadialMenuInputManager

Last updated 1 year ago

Was this helpful?

📖