Panel Menu Controller
Overview
Adds a top-level controller to handle the display of up to four child PanelMenuItemController items which are displayed as a canvas UI panel.
Prefab Usage:
- Place the
VRTK/Prefabs/PanelMenu/PanelMenu
prefab as a child of theVRTK_InteractableObject
the panel menu is for. - Optionally remove the panel control menu item child GameObjects if they are not required, e.g.
PanelTopControls
. - Set the panel menu item controllers on the
VRTK_PanelMenuController
script to determine which panel control menu items are available. - The available panel control menu items can be activated by pressing the corresponding direction on the touchpad.
Inspector Parameters
- Rotate Towards: The GameObject the panel should rotate towards, which is the Camera (eye) by default.
- Zoom Scale Multiplier: The scale multiplier, which relates to the scale of parent interactable object.
- Top Panel Menu Item Controller: The top PanelMenuItemController, which is triggered by pressing up on the controller touchpad.
- Bottom Panel Menu Item Controller: The bottom PanelMenuItemController, which is triggered by pressing down on the controller touchpad.
- Left Panel Menu Item Controller: The left PanelMenuItemController, which is triggered by pressing left on the controller touchpad.
- Right Panel Menu Item Controller: The right PanelMenuItemController, which is triggered by pressing right on the controller touchpad.
Class Methods
ToggleMenu/0
public virtual void ToggleMenu()
- Parameters
- none
- Returns
- none
The ToggleMenu method is used to show or hide the menu.
ShowMenu/0
public virtual void ShowMenu()
- Parameters
- none
- Returns
- none
The ShowMenu method is used to show the menu.
HideMenu/1
public virtual void HideMenu(bool force)
- Parameters
bool force
- If true then the menu is always hidden.
- Returns
- none
The HideMenu method is used to hide the menu.
HideMenuImmediate/0
public virtual void HideMenuImmediate()
- Parameters
- none
- Returns
- none
The HideMenuImmediate method is used to immediately hide the menu.
Example
040_Controls_Panel_Menu
contains three basic interactive object examples of the PanelMenu in use.
Updated less than a minute ago