Adventure Creator  1.74.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2019
AC.VariablesManager Class Reference
Inheritance diagram for AC.VariablesManager:

Public Member Functions

void ShowGUI ()
void ShowVariable (int variableID, VariableLocation location)
 Selects a Variable for editing More...
int ShowPlaceholderPresetData (int dataID)
GVar GetVariable (int _id)
 Gets a global variable More...
PopUpLabelData GetPopUpLabelData (int ID)

Static Public Member Functions

static bool VarMatchesFilter (GVar _var, VarFilter _varFilter, string _filter, VariableType _typeFilter)
static GVar ShowVarList (GVar _selectedVar, List< GVar > _vars, VariableLocation _location, VarFilter _varFilter, string _filter, VariableType _typeFilter, bool allowEditing, Variables _variables=null)
static void ShowVarGUI (GVar selectedVar, VariableLocation location, bool canEdit, List< VarPreset > _varPresets=null, string apiPrefix="", Variables _variables=null)
static void ShowPopUpLabelsGUI (GVar variable, bool canEdit)
static void ShowPopUpLabelsGUI (GVar variable, bool canEdit, Object objectToRecord)
static string[] PopupsGUI (string[] popUps, bool canEdit=true, Object objectToRecord=null)

Public Attributes

List< GVarvars = new List<GVar>()
List< VarPresetvarPresets = new List<VarPreset>()
bool updateRuntime = true
List< PopUpLabelDatapopUpLabelData = new List<PopUpLabelData>()
Vector2 scrollPos

Detailed Description

Handles the "Variables" tab of the Game Editor window. All global variables are defined here. Local variables are also managed here, but they are stored within the LocalVariables component on the GameEngine prefab. When the game begins, global variables are transferred to the RuntimeVariables component on the PersistentEngine prefab.

Member Function Documentation

◆ GetVariable()

GVar AC.VariablesManager.GetVariable ( int  _id)

Gets a global variable

_idThe ID number of the global variable to find
The global variable

◆ ShowGUI()

void AC.VariablesManager.ShowGUI ( )

Shows the GUI.

◆ ShowVariable()

void AC.VariablesManager.ShowVariable ( int  variableID,
VariableLocation  location 

Selects a Variable for editing

variableIDThe ID of the Variable to select
locationThe Variable's location (Global, Local)

Member Data Documentation

◆ popUpLabelData

List<PopUpLabelData> AC.VariablesManager.popUpLabelData = new List<PopUpLabelData>()

Data for shared popup variable label

◆ updateRuntime

bool AC.VariablesManager.updateRuntime = true

If True, then the Variables Manager GUI will show the live values of each variable, rather than their default values

◆ varPresets

List<VarPreset> AC.VariablesManager.varPresets = new List<VarPreset>()

A List of preset values that the variables can be bulk-assigned to

◆ vars

List<GVar> AC.VariablesManager.vars = new List<GVar>()

A List of the game's global variables