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

Public Member Functions

void ShowGUI ()
 
void ChangeGlobalVariableID (int oldID, int newID)
 
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...
 
GVar GetVariable (string _name)
 Gets a variable with a particular name More...
 
Timer GetTimer (int _id)
 Gets a timer 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 GVar ShowVarList (GVar _selectedVar, List< GVar > _vars, VariableLocation _location, VarFilter _varFilter, string _filter, VariableType _typeFilter, bool allowEditing, Variables _variables, ref GVar lastDragOver, ref int _lastSwapIndex, bool isDragging)
 
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> ()
 
List< Timertimers = new List<Timer> ()
 
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

◆ GetTimer()

Timer AC.VariablesManager.GetTimer ( int  _id)

Gets a timer

Parameters
_idThe ID number of the timer to find
Returns
The timer

◆ GetVariable() [1/2]

GVar AC.VariablesManager.GetVariable ( int  _id)

Gets a global variable

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

◆ GetVariable() [2/2]

GVar AC.VariablesManager.GetVariable ( string  _name)

Gets a variable with a particular name

Parameters
_nameThe name of the variable to get
Returns
The variable with the requested name, or null if not found

◆ ShowGUI()

void AC.VariablesManager.ShowGUI ( )

Shows the GUI.

◆ ShowVariable()

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

Selects a Variable for editing

Parameters
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

◆ timers

List<Timer> AC.VariablesManager.timers = new List<Timer> ()

A List of the game's timers

◆ 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