Adventure Creator  1.68.0
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.PlayMakerIntegration Class Reference

Static Public Member Functions

static bool IsDefinePresent ()
 Checks if the 'PlayMakerIsPresent' preprocessor has been defined. More...
 
static bool HasFSM (GameObject gameObject)
 Checks if a GameObject has a PlayMakerFSM component. More...
 
static void CallEvent (GameObject linkedObject, string eventName, string fsmName)
 Calls a PlayMaker event on a specific FSM. More...
 
static void CallEvent (GameObject linkedObject, string eventName)
 Calls a PlayMaker FSM event. More...
 
static int GetInt (string _name, Variables _variables)
 Gets the value of a PlayMaker integer. More...
 
static bool GetBool (string _name, Variables _variables)
 Gets the value of a PlayMaker boolean. More...
 
static string GetString (string _name, Variables _variables)
 Gets the value of a PlayMaker string. More...
 
static float GetFloat (string _name, Variables _variables)
 Gets the value of a PlayMaker float. More...
 
static Vector3 GetVector3 (string _name, Variables _variables)
 Gets the value of a PlayMaker Vector3. More...
 
static void SetInt (string _name, int _val, Variables _variables)
 Sets the value of a PlayMaker integer. More...
 
static void SetBool (string _name, bool _val, Variables _variables)
 Sets the value of a PlayMaker booleam. More...
 
static void SetString (string _name, string _val, Variables _variables)
 Sets the value of a PlayMaker string. More...
 
static void SetFloat (string _name, float _val, Variables _variables)
 Sets the value of a PlayMaker float. More...
 
static void SetVector3 (string _name, Vector3 _val, Variables _variables)
 Sets the value of a PlayMaker Vector3. More...
 

Detailed Description

A class the contains a number of static functions to assist with PlayMaker integration. To use PlayMaker with Adventure Creator, the 'PlayMakerIsPresent' preprocessor must be defined.

Member Function Documentation

◆ CallEvent() [1/2]

static void AC.PlayMakerIntegration.CallEvent ( GameObject  linkedObject,
string  eventName,
string  fsmName 
)
static

Calls a PlayMaker event on a specific FSM.

Parameters
linkedObjectThe GameObject with the PlayMakerFSM component
eventNameThe name of the event to call
fsmNmeThe name of the FSM to call

◆ CallEvent() [2/2]

static void AC.PlayMakerIntegration.CallEvent ( GameObject  linkedObject,
string  eventName 
)
static

Calls a PlayMaker FSM event.

Parameters
linkedObjectThe GameObject with the PlayMakerFSM component
eventNameThe name of the event to call

◆ GetBool()

static bool AC.PlayMakerIntegration.GetBool ( string  _name,
Variables  _variables 
)
static

Gets the value of a PlayMaker boolean.

Parameters
_nameThe name of the PlayMaker boolean to search for
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global
Returns
The value of the PlayMaker boolean

◆ GetFloat()

static float AC.PlayMakerIntegration.GetFloat ( string  _name,
Variables  _variables 
)
static

Gets the value of a PlayMaker float.

Parameters
_nameThe name of the PlayMaker float to search for
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global
Returns
The value of the PlayMaker float

◆ GetInt()

static int AC.PlayMakerIntegration.GetInt ( string  _name,
Variables  _variables 
)
static

Gets the value of a PlayMaker integer.

Parameters
_nameThe name of the PlayMaker integer to search for
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global
Returns
The value of the PlayMaker integer

◆ GetString()

static string AC.PlayMakerIntegration.GetString ( string  _name,
Variables  _variables 
)
static

Gets the value of a PlayMaker string.

Parameters
_nameThe name of the PlayMaker string to search for
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global
Returns
The value of the PlayMaker string

◆ GetVector3()

static Vector3 AC.PlayMakerIntegration.GetVector3 ( string  _name,
Variables  _variables 
)
static

Gets the value of a PlayMaker Vector3.

Parameters
_nameThe name of the PlayMaker Vector3 to search for
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global
Returns
The value of the PlayMaker Vector3

◆ HasFSM()

static bool AC.PlayMakerIntegration.HasFSM ( GameObject  gameObject)
static

Checks if a GameObject has a PlayMakerFSM component.

Parameters
gameObjectThe GameObject to check
Returns
True if the GameObject has a PlayMakerFSM component

◆ IsDefinePresent()

static bool AC.PlayMakerIntegration.IsDefinePresent ( )
static

Checks if the 'PlayMakerIsPresent' preprocessor has been defined.

Returns
True if the 'PlayMakerIsPresent' preprocessor has been defined

◆ SetBool()

static void AC.PlayMakerIntegration.SetBool ( string  _name,
bool  _val,
Variables  _variables 
)
static

Sets the value of a PlayMaker booleam.

Parameters
_nameThe name of the PlayMaker booleam to update
_valThe new value to assign the PlayMaker boolean
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global

◆ SetFloat()

static void AC.PlayMakerIntegration.SetFloat ( string  _name,
float  _val,
Variables  _variables 
)
static

Sets the value of a PlayMaker float.

Parameters
_nameThe name of the PlayMaker float to update
_valThe new value to assign the PlayMaker float
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global

◆ SetInt()

static void AC.PlayMakerIntegration.SetInt ( string  _name,
int  _val,
Variables  _variables 
)
static

Sets the value of a PlayMaker integer.

Parameters
_nameThe name of the PlayMaker integer to update
_valThe new value to assign the PlayMaker integer
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global

◆ SetString()

static void AC.PlayMakerIntegration.SetString ( string  _name,
string  _val,
Variables  _variables 
)
static

Sets the value of a PlayMaker string.

Parameters
_nameThe name of the PlayMaker string to update
_valThe new value to assign the PlayMaker string
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global

◆ SetVector3()

static void AC.PlayMakerIntegration.SetVector3 ( string  _name,
Vector3  _val,
Variables  _variables 
)
static

Sets the value of a PlayMaker Vector3.

Parameters
_nameThe name of the PlayMaker Vector3 to update
_valThe new value to assign the PlayMaker Vector3
_variablesThe Variables component attached to the FSM, if local. If null, the variable is assumed to be global