Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
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 DisableAllKeys (string _groupLabel, 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...
 
void SetActiveKey (string _groupLabel, 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...
 
ShapeGroup GetGroup (string label)
 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...
 
void SetTimelineOverride (int groupID, int keyID, int intensity)
 
void SetTimelineOverride (int groupID, int keyID_A, int intensityA, int keyID_B, int intensityB)
 

Public Attributes

List< ShapeGroupshapeGroups = new List<ShapeGroup>()
 

Protected Member Functions

void Awake ()
 
void Update ()
 
void LateUpdate ()
 

Protected Attributes

SkinnedMeshRenderer skinnedMeshRenderer
 

Properties

SkinnedMeshRenderer SkinnedMeshRenderer [get]
 

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() [1/2]

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.

◆ DisableAllKeys() [2/2]

void AC.Shapeable.DisableAllKeys ( string  _groupLabel,
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() [1/2]

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

◆ GetGroup() [2/2]

ShapeGroup AC.Shapeable.GetGroup ( string  label)

Gets the ShapeGroup associated with an ID number.

Parameters
labelThe ShapeGroup's label
Returns
The ShapeGroup associated with the ID number

◆ SetActiveKey() [1/3]

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/3]

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.

◆ SetActiveKey() [3/3]

void AC.Shapeable.SetActiveKey ( string  _groupLabel,
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
_groupLabelThe name 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

Property Documentation

◆ SkinnedMeshRenderer

SkinnedMeshRenderer AC.Shapeable.SkinnedMeshRenderer
getprotected

The SkinnedMeshRenderer that this component controls