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

Public Member Functions

void DisableAllKeys (int _groupID, float _deltaTime, MoveMethod _moveMethod, AnimationCurve _timeCurve)
 Disables all blendshapes within a ShapeGroup. More...
 
void SetActiveKey (int _groupID, int _keyID, float _value, float _deltaTime, MoveMethod _moveMethod, AnimationCurve _timeCurve)
 Sets a blendshape within a ShapeGroup as the "active" one, causing all others to be disabled. More...
 
void SetActiveKey (int _groupID, string _keyLabel, float _value, float _deltaTime, MoveMethod _moveMethod, AnimationCurve _timeCurve)
 Sets a blendshape within a ShapeGroup as the "active" one, causing all others to be disabled. More...
 
ShapeGroup GetGroup (int ID)
 Gets the ShapeGroup associated with an ID number. More...
 
void Change (int _shapeKey, float _targetShape, float _deltaTime)
 Sets the value of a specific blendshape on the SkinnedMeshRenderer. More...
 

Public Attributes

List< ShapeGroupshapeGroups = new List<ShapeGroup>()
 

Detailed Description

This script can sort blendshapes on a SkinnedMeshRenderer into groups, and provides functions to easily interpolate their values - affecting all blendshapes within a group. If LipSyncing is set to affect GameObjects, then this componentt is necessary to animate phoneme shapes.

Member Function Documentation

◆ Change()

void AC.Shapeable.Change ( int  _shapeKey,
float  _targetShape,
float  _deltaTime 
)

Sets the value of a specific blendshape on the SkinnedMeshRenderer.

Parameters
_shapeKeyThe index number of the blendshape to affect
_targetShapeThe target intensity of the blendshape
_deltaTimeThe duration of the transition effect

◆ DisableAllKeys()

void AC.Shapeable.DisableAllKeys ( int  _groupID,
float  _deltaTime,
MoveMethod  _moveMethod,
AnimationCurve  _timeCurve 
)

Disables all blendshapes within a ShapeGroup.

Parameters
_groupIDThe unique identifier of the ShapeGroup to affect
_deltaTimeThe duration, in seconds, that the group's blendshapes should be disabled
_moveMethodThe interpolation method by which the blendshapes are affected (Linear, Smooth, Curved, EaseIn, EaseOut, CustomCurve)
_timeCurveIf _moveMethod = MoveMethod.CustomCurve, then the transition speed will be follow the shape of the supplied AnimationCurve. This curve can exceed "1" in the Y-scale, allowing for overshoot effects.

◆ GetGroup()

ShapeGroup AC.Shapeable.GetGroup ( int  ID)

Gets the ShapeGroup associated with an ID number.

Parameters
IDA unique identifier for the ShapeGroup
Returns
The ShapeGroup associated with the ID number

◆ SetActiveKey() [1/2]

void AC.Shapeable.SetActiveKey ( int  _groupID,
int  _keyID,
float  _value,
float  _deltaTime,
MoveMethod  _moveMethod,
AnimationCurve  _timeCurve 
)

Sets a blendshape within a ShapeGroup as the "active" one, causing all others to be disabled.

Parameters
_groupIDThe unique identifier of the ShapeGroup to affect
_keyIDThe unique identifier of the blendshape to affect</param?
Parameters
_valueThe value to set the active blendshape
_deltaTimeThe duration, in seconds, that the group's blendshapes should be affected
_moveMethodThe interpolation method by which the blendshapes are affected (Linear, Smooth, Curved, EaseIn, EaseOut, CustomCurve)
_timeCurveIf _moveMethod = MoveMethod.CustomCurve, then the transition speed will be follow the shape of the supplied AnimationCurve. This curve can exceed "1" in the Y-scale, allowing for overshoot effects.

◆ SetActiveKey() [2/2]

void AC.Shapeable.SetActiveKey ( int  _groupID,
string  _keyLabel,
float  _value,
float  _deltaTime,
MoveMethod  _moveMethod,
AnimationCurve  _timeCurve 
)

Sets a blendshape within a ShapeGroup as the "active" one, causing all others to be disabled.

Parameters
_groupIDThe unique identifier of the ShapeGroup to affect
_keyLabelThe name of the blendshape to affect</param?
Parameters
_valueThe value to set the active blendshape
_deltaTimeThe duration, in seconds, that the group's blendshapes should be affected
_moveMethodThe interpolation method by which the blendshapes are affected (Linear, Smooth, Curved, EaseIn, EaseOut, CustomCurve)
_timeCurveIf _moveMethod = MoveMethod.CustomCurve, then the transition speed will be follow the shape of the supplied AnimationCurve. This curve can exceed "1" in the Y-scale, allowing for overshoot effects.

Member Data Documentation

◆ shapeGroups

List<ShapeGroup> AC.Shapeable.shapeGroups = new List<ShapeGroup>()

A List of user-defined ShapeGroup instances, that define how the blendshapes are sorted