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

Static Public Member Functions

static void SetMixerVolume (AudioMixerGroup audioMixerGroup, string parameter, float volume)
 Sets the volume of an Audio Mixer Group (Unity 5 and onward only). More...
 
static void AssignMixerGroup (AudioSource audioSource, SoundType soundType)
 Sets the 'Output Audio Mixer Group' of an Audio Source, based on its sound type (Unity 5 only). More...
 
static int GetAnimLayerInt (AnimLayer animLayer)
 Returns the integer value of the AnimLayer enum. Necessary because two Neck layers are used, though only one is present in the enum. More...
 
static References GetReferences ()
 
static RuntimeActionList RunActionListAsset (ActionListAsset actionListAsset, int parameterID=-1, int parameterValue=0)
 Runs an ActionList asset file. If the ActionList contains an Integer parameter, the parameter's value can be set here. More...
 
static RuntimeActionList RunActionListAsset (ActionListAsset actionListAsset, GameObject parameterValue)
 Runs an ActionList asset file, and sets the value of the first parameter, provided that it is a GameObject. More...
 
static RuntimeActionList RunActionListAsset (ActionListAsset actionListAsset, int i, bool addToSkipQueue)
 Runs an ActionList asset file. More...
 
static RuntimeActionList RunActionListAsset (ActionListAsset actionListAsset, Conversation endConversation)
 Runs an ActionList asset file. More...
 
static RuntimeActionList RunActionListAsset (ActionListAsset actionListAsset, Conversation endConversation, int i, bool doSkip, bool addToSkipQueue)
 Runs or skips an ActionList asset file. More...
 
static RuntimeActionList SkipActionListAsset (ActionListAsset actionListAsset)
 Skips an ActionList asset file. More...
 
static RuntimeActionList SkipActionListAsset (ActionListAsset actionListAsset, int i, Conversation endConversation=null)
 Skips an ActionList asset file. More...
 
static double CalculateFormula (string formula)
 Calculates a formula (Not available for Windows Phone devices). More...
 
static string CombineLanguageString (string string1, string string2, int langugeIndex, bool separateWithSpace=true)
 Combines two on-screen strings into one. More...
 
static string ConvertTokens (string _text)
 Converts a string's tokens into their true values. The '[var:ID]' token will be replaced by the value of global variable 'ID'. The '[localvar:ID]' token will be replaced by the value of local variable 'ID'. More...
 
static string ConvertTokens (string _text, int languageNumber, LocalVariables localVariables=null, List< ActionParameter > parameters=null)
 Converts a string's tokens into their true values. The '[var:ID]' token will be replaced by the value of global variable 'ID'. The '[localvar:ID]' token will be replaced by the value of local variable 'ID'. More...
 
static string GetVariableTokenText (VariableLocation location, int varID, int variablesConstantID=0)
 
static string ConvertLocalVariableTokenToGlobal (string _text, int oldLocalID, int newGlobalID)
 Converts a token that refers to a given local variable, to one that refers to a given global variable More...
 
static string ConvertGlobalVariableTokenToLocal (string _text, int oldGlobalID, int newLocalID)
 Converts a token that refers to a given local variable, to one that refers to a given global variable More...
 
static void DrawCubeCollider (Transform transform, Color color)
 Draws a cube gizmo in the Scene window. More...
 
static void DrawBoxCollider (Transform transform, Color color)
 Draws a box gizmo in the Scene window. More...
 
static void DrawPolygonCollider (Transform transform, PolygonCollider2D poly, Color color)
 Draws an outline of a Polygon Collider 2D in the Scene window. More...
 
static void DrawMeshCollider (Transform transform, Mesh mesh, Color color)
 Draws an outline of a 3D Mesh in the Scene window. More...
 
static void DrawSphereCollider (Transform transform, SphereCollider sphereCollider, Color color)
 Draws a sphere in the Scene window. More...
 
static void DrawCapsule (Transform transform, Vector3 centre, float radius, float height, Color color)
 Draws a capsule in the Scene window. More...
 
static void FindObjectWithConstantID (int _constantID)
 Locates an object with a supplied ConstantID number (Unity Editor only). If the object is not found in the current scene, all scenes in the Build Settings will be searched. Once an object is found, it will be pinged in the Hierarchy window. More...
 
static string[] GetSceneFiles ()
 Returns all scene filenames listed in the Build Settings (Unity Editor only). More...
 
static int GlobalVariableGUI (string label, int variableID, string tooltip="")
 Generates a Global Variable selector GUI (Unity Editor only). More...
 
static int GlobalVariableGUI (string label, int variableID, VariableType variableType, string tooltip="")
 Generates a Global Variable selector GUI (Unity Editor only). More...
 
static int GlobalVariableGUI (string label, int variableID, VariableType[] variableTypes, string tooltip="")
 Generates a Global Variable selector GUI (Unity Editor only). More...
 
static int LocalVariableGUI (string label, int variableID, VariableType variableType)
 Generates a Local Variable selector GUI (Unity Editor only). More...
 
static int LocalVariableGUI (string label, int variableID, VariableType[] variableTypes)
 Generates a Local Variable selector GUI (Unity Editor only). More...
 
static int ComponentVariableGUI (string label, int variableID, VariableType variableType, Variables variables)
 Generates a Component Variable selector GUI (Unity Editor only). More...
 
static int ComponentVariableGUI (string label, int variableID, VariableType[] variableTypes, Variables variables)
 Generates a Component Variable selector GUI (Unity Editor only). More...
 
static void DrawNodeCurve (Rect start, Rect end, Color color, int offset, bool onSide, bool isDisplayed)
 Draws a curve between two Actions in the ActionList Editor window (Unity Editor only). More...
 
static void DrawNodeCurve (Rect start, Vector2 end, Color color, int offset, bool fromSide, bool toSide, bool isDisplayed)
 Draws a curve between two Actions in the ActionList Editor window (Unity Editor only). More...
 
static LayerMask LayerMaskField (string label, LayerMask layerMask, string tooltip="")
 
static Vector3 GetScreenDirection (Vector3 originWorldPosition, Vector3 targetWorldPosition)
 Returns the vector between two world-space points when converted to screen-space.</summary?

Parameters
originWorldPositionThe first point in world-space
targetWorldPositionThe second point in world-space
Returns
The vector between the two points in screen-space

 
static Vector3 GetScreenNavMesh (Vector3 targetWorldPosition)
 Returns the percieved point on a NavMesh of a world-space position, when viewed through screen-space. More...
 
static Matrix4x4 SetVanishingPoint (Camera _camera, Vector2 perspectiveOffset, bool accountForFOV=false)
 Sets the vanishing point of a perspective-locked camera. More...
 
static string UniqueName (string name)
 Generates a unique name for a GameObject by adding numbers to the end of it. More...
 
static Rect GUIBox (float centre_x, float centre_y, float size)
 Generates a Rect from a square. More...
 
static Rect GUIBox (Vector2 posVector, float size)
 Generates a Rect from a square. More...
 
static Rect GUIRect (float centre_x, float centre_y, float width, float height)
 Generates a Rect from a rectangle. More...
 
static void PlayAnimClipFrame (Animation _animation, int layer, AnimationClip clip, AnimationBlendMode blendMode, WrapMode wrapMode, float fadeTime, Transform mixingBone, float normalisedFrame)
 Initialises and plays a legacy AnimationClip on an Animation component, starting from a set point. More...
 
static void PlayAnimClip (Animation _animation, int layer, AnimationClip clip, AnimationBlendMode blendMode=AnimationBlendMode.Blend, WrapMode wrapMode=WrapMode.ClampForever, float fadeTime=0f, Transform mixingBone=null, bool reverse=false)
 Initialises and plays a legacy AnimationClip on an Animation component. More...
 
static void CleanUnusedClips (Animation _animation)
 Cleans the supplied Animation component of any clips not being played. More...
 
static float Lerp (float from, float to, float t)
 Lerps from one float to another over time. More...
 
static Vector3 Lerp (Vector3 from, Vector3 to, float t)
 Lerps from one Vector3 to another over time. More...
 
static Quaternion Lerp (Quaternion from, Quaternion to, float t)
 Lerps from one Quaternion to another over time. More...
 
static float Interpolate (float startT, float deltaT, MoveMethod moveMethod, AnimationCurve timeCurve=null)
 Interpolates a float over time, according to various interpolation methods. More...
 
static float Interpolate (float weight, MoveMethod moveMethod, AnimationCurve timeCurve=null)
 
static void DrawTextEffect (Rect rect, string text, GUIStyle style, Color outColor, Color inColor, float size, TextEffects textEffects)
 Draws GUI text with an outline and/or shadow. More...
 
static string PrepareStringForSaving (string _string)
 
static string PrepareStringForLoading (string _string)
 
static float SignedAngle (Vector2 from, Vector2 to)
 Gets the signed angle between two 2D vectors More...
 
static Vector3 GetCharLookVector (CharDirection direction, Char _character=null)
 

Detailed Description

A class that provides a number of useful functons for both editor and runtime.

Member Function Documentation

◆ AssignMixerGroup()

static void AC.AdvGame.AssignMixerGroup ( AudioSource  audioSource,
SoundType  soundType 
)
static

Sets the 'Output Audio Mixer Group' of an Audio Source, based on its sound type (Unity 5 only).

Parameters
audioSourceThe Audio Source component to affect
soundTypeThe sound type that controls the volume

◆ CalculateFormula()

static double AC.AdvGame.CalculateFormula ( string  formula)
static

Calculates a formula (Not available for Windows Phone devices).

Parameters
formulaThe formula string to calculate
Returns
The result

◆ CleanUnusedClips()

static void AC.AdvGame.CleanUnusedClips ( Animation  _animation)
static

Cleans the supplied Animation component of any clips not being played.

Parameters
_animationThe Animation component to clean

◆ CombineLanguageString()

static string AC.AdvGame.CombineLanguageString ( string  string1,
string  string2,
int  langugeIndex,
bool  separateWithSpace = true 
)
static

Combines two on-screen strings into one.

Parameters
string1The first string
string1The second string
languageIndexThe index number of the current language. If the language reads right-to-left, then the strings will be combined in reverse
separateWithSpaceIf True, the two strings will be separated by a space
Returns
The combined string

◆ ComponentVariableGUI() [1/2]

static int AC.AdvGame.ComponentVariableGUI ( string  label,
int  variableID,
VariableType  variableType,
Variables  variables 
)
static

Generates a Component Variable selector GUI (Unity Editor only).

Parameters
labelThe label of the popup GUI
variableIDThe currently-selected local variable's ID number
variableTypeThe variable type to restrict choices to
variablesThe Variables component that contains the variable
Returns
The newly-selected local variable's ID number

◆ ComponentVariableGUI() [2/2]

static int AC.AdvGame.ComponentVariableGUI ( string  label,
int  variableID,
VariableType[]  variableTypes,
Variables  variables 
)
static

Generates a Component Variable selector GUI (Unity Editor only).

Parameters
labelThe label of the popup GUI
variableIDThe currently-selected local variable's ID number
variableTypesAn array variable types to restrict choices to
variablesThe Variables component that contains the variable
Returns
The newly-selected local variable's ID number

◆ ConvertGlobalVariableTokenToLocal()

static string AC.AdvGame.ConvertGlobalVariableTokenToLocal ( string  _text,
int  oldGlobalID,
int  newLocalID 
)
static

Converts a token that refers to a given local variable, to one that refers to a given global variable

Parameters
_textThe text to convert
oldGlobalIDThe ID number of the old global variable
newLocalIDThe ID number of the new local variable
Returns
The converted text

◆ ConvertLocalVariableTokenToGlobal()

static string AC.AdvGame.ConvertLocalVariableTokenToGlobal ( string  _text,
int  oldLocalID,
int  newGlobalID 
)
static

Converts a token that refers to a given local variable, to one that refers to a given global variable

Parameters
_textThe text to convert
oldLocalIDThe ID number of the old local variable
newGlobalIDThe ID number of the new global variable
Returns
The converted text

◆ ConvertTokens() [1/2]

static string AC.AdvGame.ConvertTokens ( string  _text)
static

Converts a string's tokens into their true values. The '[var:ID]' token will be replaced by the value of global variable 'ID'. The '[localvar:ID]' token will be replaced by the value of local variable 'ID'.

Parameters
_textThe original string with tokens
Returns
The converted string without tokens

◆ ConvertTokens() [2/2]

static string AC.AdvGame.ConvertTokens ( string  _text,
int  languageNumber,
LocalVariables  localVariables = null,
List< ActionParameter parameters = null 
)
static

Converts a string's tokens into their true values. The '[var:ID]' token will be replaced by the value of global variable 'ID'. The '[localvar:ID]' token will be replaced by the value of local variable 'ID'.

Parameters
_textThe original string with tokens
languageNumberThe index number of the game's current language
localVariablesThe LocalVariables script to read local variables from, if not the scene default
Returns
The converted string without tokens

◆ DrawBoxCollider()

static void AC.AdvGame.DrawBoxCollider ( Transform  transform,
Color  color 
)
static

Draws a box gizmo in the Scene window.

Parameters
transformThe transform of the object to draw around
colorThe colour of the box

◆ DrawCapsule()

static void AC.AdvGame.DrawCapsule ( Transform  transform,
Vector3  centre,
float  radius,
float  height,
Color  color 
)
static

Draws a capsule in the Scene window.

Parameters
transformThe transform of the object to draw around
centreThe capsule's centre
radiusThe capsule's radius
heightThe capsule's height
colorThe colour to draw with

◆ DrawCubeCollider()

static void AC.AdvGame.DrawCubeCollider ( Transform  transform,
Color  color 
)
static

Draws a cube gizmo in the Scene window.

Parameters
transformThe transform of the object to draw around
colorThe colour of the cube

◆ DrawMeshCollider()

static void AC.AdvGame.DrawMeshCollider ( Transform  transform,
Mesh  mesh,
Color  color 
)
static

Draws an outline of a 3D Mesh in the Scene window.

Parameters
transformThe transform of the object to draw around
meshThe Mesh to draw
colorThe colour of the mesh

◆ DrawNodeCurve() [1/2]

static void AC.AdvGame.DrawNodeCurve ( Rect  start,
Rect  end,
Color  color,
int  offset,
bool  onSide,
bool  isDisplayed 
)
static

Draws a curve between two Actions in the ActionList Editor window (Unity Editor only).

Parameters
startThe Rect of the Action to draw from
endThe Rect of the Action to draw to
colorThe colour of the curve
offsetHow far the line should be offset along the rect
onSideTrue if the curve should begin on the side of the Action
isDisplayedTrue if the Action to draw from is expanded

◆ DrawNodeCurve() [2/2]

static void AC.AdvGame.DrawNodeCurve ( Rect  start,
Vector2  end,
Color  color,
int  offset,
bool  fromSide,
bool  toSide,
bool  isDisplayed 
)
static

Draws a curve between two Actions in the ActionList Editor window (Unity Editor only).

Parameters
startThe Rect of the Action to draw from
endThe point to draw to
colorThe colour of the curve
offsetHow far the line should be offset along the rect
fromSideTrue if the curve should begin on the side of the Action
toSideTrue if the curve should end on the side of the Action
isDisplayedTrue if the Action to draw from is expanded

◆ DrawPolygonCollider()

static void AC.AdvGame.DrawPolygonCollider ( Transform  transform,
PolygonCollider2D  poly,
Color  color 
)
static

Draws an outline of a Polygon Collider 2D in the Scene window.

Parameters
transformThe transform of the object to draw around
polyThe Polygon Collider 2D
colorThe colour of the outline

◆ DrawSphereCollider()

static void AC.AdvGame.DrawSphereCollider ( Transform  transform,
SphereCollider  sphereCollider,
Color  color 
)
static

Draws a sphere in the Scene window.

Parameters
transformThe transform of the object to draw around
sphereColliderThe SphereCollider to use as a reference
colorThe colour to draw with

◆ DrawTextEffect()

static void AC.AdvGame.DrawTextEffect ( Rect  rect,
string  text,
GUIStyle  style,
Color  outColor,
Color  inColor,
float  size,
TextEffects  textEffects 
)
static

Draws GUI text with an outline and/or shadow.

Parameters
rectThe Rect of the GUI text
textThe text itself
styleThe GUIStyle that the GUI text uses
outColourThe colour of the text's outline/shadow
inColourThe colour of the text itself
sizeThe size of the text
textEffectsThe type of text effect (Outline, Shadow, OutlineAndShadow, None)

◆ FindObjectWithConstantID()

static void AC.AdvGame.FindObjectWithConstantID ( int  _constantID)
static

Locates an object with a supplied ConstantID number (Unity Editor only). If the object is not found in the current scene, all scenes in the Build Settings will be searched. Once an object is found, it will be pinged in the Hierarchy window.

Parameters
_constantIDThe ConstantID number of the object to find

◆ GetAnimLayerInt()

static int AC.AdvGame.GetAnimLayerInt ( AnimLayer  animLayer)
static

Returns the integer value of the AnimLayer enum. Necessary because two Neck layers are used, though only one is present in the enum.

Parameters
animLayerThe AnimLayer enum
Returns
The integer value

◆ GetReferences()

static References AC.AdvGame.GetReferences ( )
static

Returns the References asset, which should be located in a Resources directory.

◆ GetSceneFiles()

static string [] AC.AdvGame.GetSceneFiles ( )
static

Returns all scene filenames listed in the Build Settings (Unity Editor only).

Returns
An array of scene filenames as strings

◆ GetScreenNavMesh()

static Vector3 AC.AdvGame.GetScreenNavMesh ( Vector3  targetWorldPosition)
static

Returns the percieved point on a NavMesh of a world-space position, when viewed through screen-space.

Parameters
targetWorldPositionThe position in world-space
Returns
The point on the NavMesh that the position lies when viewed through screen-space

◆ GlobalVariableGUI() [1/3]

static int AC.AdvGame.GlobalVariableGUI ( string  label,
int  variableID,
string  tooltip = "" 
)
static

Generates a Global Variable selector GUI (Unity Editor only).

Parameters
labelThe label of the popup GUI
variableIDThe currently-selected global variable's ID number
Returns
The newly-selected global variable's ID number

◆ GlobalVariableGUI() [2/3]

static int AC.AdvGame.GlobalVariableGUI ( string  label,
int  variableID,
VariableType  variableType,
string  tooltip = "" 
)
static

Generates a Global Variable selector GUI (Unity Editor only).

Parameters
labelThe label of the popup GUI
variableIDThe currently-selected global variable's ID number
variableTypeThe variable type to restrict choices to
Returns
The newly-selected global variable's ID number

◆ GlobalVariableGUI() [3/3]

static int AC.AdvGame.GlobalVariableGUI ( string  label,
int  variableID,
VariableType[]  variableTypes,
string  tooltip = "" 
)
static

Generates a Global Variable selector GUI (Unity Editor only).

Parameters
labelThe label of the popup GUI
variableIDThe currently-selected global variable's ID number
variableTypesAn array variable types to restrict choices to
Returns
The newly-selected global variable's ID number

◆ GUIBox() [1/2]

static Rect AC.AdvGame.GUIBox ( float  centre_x,
float  centre_y,
float  size 
)
static

Generates a Rect from a square.

Parameters
centre_xThe centre of the square in the x-direction
centre_yThe centre of the square in the y-direction
sizeThe size of the square
Returns
The generated Rect

◆ GUIBox() [2/2]

static Rect AC.AdvGame.GUIBox ( Vector2  posVector,
float  size 
)
static

Generates a Rect from a square.

Parameters
posVectorThe top-left corner of the square
sizeThe size of the square
Returns
The generated Rect

◆ GUIRect()

static Rect AC.AdvGame.GUIRect ( float  centre_x,
float  centre_y,
float  width,
float  height 
)
static

Generates a Rect from a rectangle.

Parameters
centre_xThe centre of the rectangle in the x-direction
centre_yThe centre of the rectangle in the y-direction
widthThe width of the rectangle
heightThe height of the rectangle
Returns
The generated Rect

◆ Interpolate()

static float AC.AdvGame.Interpolate ( float  startT,
float  deltaT,
MoveMethod  moveMethod,
AnimationCurve  timeCurve = null 
)
static

Interpolates a float over time, according to various interpolation methods.

Parameters
startTThe starting time
deltaTThe time difference
moveMethodThe method of interpolation (Linear, Smooth, Curved, EaseIn, EaseOut, Curved)
timeCurveThe AnimationCurve to interpolate against, if the moveMethod = MoveMethod.Curved
Returns
The interpolated float

◆ Lerp() [1/3]

static float AC.AdvGame.Lerp ( float  from,
float  to,
float  t 
)
static

Lerps from one float to another over time.

Parameters
fromThe initial value
toThe final value
tThe time value. If greater than 1, the result will overshoot the final value. If less than 1, the result will undershoot the initial value
Returns
The lerped float

◆ Lerp() [2/3]

static Quaternion AC.AdvGame.Lerp ( Quaternion  from,
Quaternion  to,
float  t 
)
static

Lerps from one Quaternion to another over time.

Parameters
fromThe initial value
toThe final value
tThe time value. If greater than 1, the result will overshoot the final value. If less than 1, the result will undershoot the initial value
Returns
The lerped Quaternion

◆ Lerp() [3/3]

static Vector3 AC.AdvGame.Lerp ( Vector3  from,
Vector3  to,
float  t 
)
static

Lerps from one Vector3 to another over time.

Parameters
fromThe initial value
toThe final value
tThe time value. If greater than 1, the result will overshoot the final value. If less than 1, the result will undershoot the initial value
Returns
The lerped Vector3

◆ LocalVariableGUI() [1/2]

static int AC.AdvGame.LocalVariableGUI ( string  label,
int  variableID,
VariableType  variableType 
)
static

Generates a Local Variable selector GUI (Unity Editor only).

Parameters
labelThe label of the popup GUI
variableIDThe currently-selected local variable's ID number
variableTypeThe variable type to restrict choices to
Returns
The newly-selected local variable's ID number

◆ LocalVariableGUI() [2/2]

static int AC.AdvGame.LocalVariableGUI ( string  label,
int  variableID,
VariableType[]  variableTypes 
)
static

Generates a Local Variable selector GUI (Unity Editor only).

Parameters
labelThe label of the popup GUI
variableIDThe currently-selected local variable's ID number
variableTypesAn array variable types to restrict choices to
Returns
The newly-selected local variable's ID number

◆ PlayAnimClip()

static void AC.AdvGame.PlayAnimClip ( Animation  _animation,
int  layer,
AnimationClip  clip,
AnimationBlendMode  blendMode = AnimationBlendMode.Blend,
WrapMode  wrapMode = WrapMode.ClampForever,
float  fadeTime = 0f,
Transform  mixingBone = null,
bool  reverse = false 
)
static

Initialises and plays a legacy AnimationClip on an Animation component.

Parameters
_animationThe Animation component
layerThe layer to play the animation on
clipThe AnimatonClip to play
blendModeThe animation's AnimationBlendMode
wrapModeThe animation's WrapMode
fadeTimeThe transition time to the new animation
mixingBoneThe transform to set as the animation's mixing transform
reverseTrue if the animation should be reversed

◆ PlayAnimClipFrame()

static void AC.AdvGame.PlayAnimClipFrame ( Animation  _animation,
int  layer,
AnimationClip  clip,
AnimationBlendMode  blendMode,
WrapMode  wrapMode,
float  fadeTime,
Transform  mixingBone,
float  normalisedFrame 
)
static

Initialises and plays a legacy AnimationClip on an Animation component, starting from a set point.

Parameters
_animationThe Animation component
layerThe layer to play the animation on
clipThe AnimatonClip to play
blendModeThe animation's AnimationBlendMode
wrapModeThe animation's WrapMode
fadeTimeThe transition time to the new animation
mixingBoneThe transform to set as the animation's mixing transform
normalisedFrameHow far along the timeline the animation should start from (0 to 1)

◆ RunActionListAsset() [1/5]

static RuntimeActionList AC.AdvGame.RunActionListAsset ( ActionListAsset  actionListAsset,
Conversation  endConversation 
)
static

Runs an ActionList asset file.

Parameters
actionListAssetThe ActionList asset to run
endConversationThe Conversation to enable when the ActionList is complete
Returns
The temporary RuntimeActionList object in the scene that performs the Actions within the asset

◆ RunActionListAsset() [2/5]

static RuntimeActionList AC.AdvGame.RunActionListAsset ( ActionListAsset  actionListAsset,
Conversation  endConversation,
int  i,
bool  doSkip,
bool  addToSkipQueue 
)
static

Runs or skips an ActionList asset file.

Parameters
actionListAssetThe ActionList asset to run
endConversationThe Conversation to enable when the ActionList is complete
iThe index of the Action to start from
doSkipIf True, all Actions within the ActionList will be run and completed instantly.
addToSkipQueueTrue if the ActionList should be added to the skip queue
Returns
The temporary RuntimeActionList object in the scene that performs the Actions within the asset

◆ RunActionListAsset() [3/5]

static RuntimeActionList AC.AdvGame.RunActionListAsset ( ActionListAsset  actionListAsset,
GameObject  parameterValue 
)
static

Runs an ActionList asset file, and sets the value of the first parameter, provided that it is a GameObject.

Parameters
actionListAssetThe ActionList asset to run
parameterValueThe value to set the GameObject parameter to
Returns
The temporary RuntimeActionList object in the scene that performs the Actions within the asset

◆ RunActionListAsset() [4/5]

static RuntimeActionList AC.AdvGame.RunActionListAsset ( ActionListAsset  actionListAsset,
int  i,
bool  addToSkipQueue 
)
static

Runs an ActionList asset file.

Parameters
actionListAssetThe ActionList asset to run
iThe index of the Action to start from
addToSkipQueueTrue if the ActionList should be added to the skip queue
Returns
The temporary RuntimeActionList object in the scene that performs the Actions within the asset

◆ RunActionListAsset() [5/5]

static RuntimeActionList AC.AdvGame.RunActionListAsset ( ActionListAsset  actionListAsset,
int  parameterID = -1,
int  parameterValue = 0 
)
static

Runs an ActionList asset file. If the ActionList contains an Integer parameter, the parameter's value can be set here.

Parameters
actionListAssetThe ActionList asset to run
parameterIDThe ID of the parameter to set
parameterValueThe value to set the parameter to, provided that IsIntegerBased returns True
Returns
The temporary RuntimeActionList object in the scene that performs the Actions within the asset

◆ SetMixerVolume()

static void AC.AdvGame.SetMixerVolume ( AudioMixerGroup  audioMixerGroup,
string  parameter,
float  volume 
)
static

Sets the volume of an Audio Mixer Group (Unity 5 and onward only).

Parameters
audioMixerGroupThe Audio Mixer Group to affect
parameterThe name of the attenuation parameter
volumeThe new volume (ranges from 0 to 1)

◆ SetVanishingPoint()

static Matrix4x4 AC.AdvGame.SetVanishingPoint ( Camera  _camera,
Vector2  perspectiveOffset,
bool  accountForFOV = false 
)
static

Sets the vanishing point of a perspective-locked camera.

Parameters
_cameraThe Camera to affect
perspectiveOffsetThe offset from the perspective's centre
accountForFOVIf True, then the Camera's FOV will be accounted for
Returns
A Matrix4x4 of the corrected perspective

◆ SignedAngle()

static float AC.AdvGame.SignedAngle ( Vector2  from,
Vector2  to 
)
static

Gets the signed angle between two 2D vectors

Parameters
fromThe first vector
toThe second vector
Returns
The signed angle

◆ SkipActionListAsset() [1/2]

static RuntimeActionList AC.AdvGame.SkipActionListAsset ( ActionListAsset  actionListAsset)
static

Skips an ActionList asset file.

Parameters
actionListAssetThe ActionList asset to skip
Returns
the temporary RuntimeActionList object in the scene that performs the Actions within the asset

◆ SkipActionListAsset() [2/2]

static RuntimeActionList AC.AdvGame.SkipActionListAsset ( ActionListAsset  actionListAsset,
int  i,
Conversation  endConversation = null 
)
static

Skips an ActionList asset file.

Parameters
actionListAssetThe ActionList asset to skip
iThe index of the Action to skip from
endConversationThe Conversation to enable when the ActionList is complete
Returns
The temporary RuntimeActionList object in the scene that performs the Actions within the asset

◆ UniqueName()

static string AC.AdvGame.UniqueName ( string  name)
static

Generates a unique name for a GameObject by adding numbers to the end of it.

Parameters
nameThe original name of the GameObject
Returns
A unique name for the GameObject</retuns>