Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.MenuLink Class Reference
Inheritance diagram for AC.MenuLink:

Public Member Functions

string GetLabel (int languageNumber)
 Gets the associated MenuElement's label. More...
 
bool IsVisible ()
 Checks if the associated MenuElement is currently visible. More...
 
void Interact ()
 

Public Attributes

string menuName = ""
 
string elementName = ""
 
int slot = 0
 
bool setTextLabels = false
 

Detailed Description

Before Unity's UI system was introduced, this component was used to link GameObjects to Menu elements defined in the MenuManager, allowing for 3D menus. This is now considered outdated, as Unity UIs that render in World Space can now be linked to the MenuManager instead.

Member Function Documentation

◆ GetLabel()

string AC.MenuLink.GetLabel ( int  languageNumber)

Gets the associated MenuElement's label.

Parameters
languageNumberThe language index to get the label for.
Returns
The associated MenuElement's label, translated if necessary.

◆ Interact()

void AC.MenuLink.Interact ( )

Simulates the clicking of the associated MenuElement.

◆ IsVisible()

bool AC.MenuLink.IsVisible ( )

Checks if the associated MenuElement is currently visible.

Returns
True if the associatated MenuElement is currently visible.

Member Data Documentation

◆ elementName

string AC.MenuLink.elementName = ""

The name of the associated MenuElement

◆ menuName

string AC.MenuLink.menuName = ""

The name of the associated Menu

◆ setTextLabels

bool AC.MenuLink.setTextLabels = false

If True, then any GUIText or TextMesh components will have their text values overridden by that of the associated MenuElement

◆ slot

int AC.MenuLink.slot = 0

The slot index of the associated MenuElement