AnimatorController Configuration Data

The following information details the helper data used for AnimatorController configuration. Accessing the AnimatorController variables in the helper data requires an index to the list. Keep in mind, for every data set in the components configuration there is a corresponding set of helper data in controllerVars, so the index will be the same. See the previous page discussing configuration data for supporting information. See the Specialty Controller doc for more information on the AnimatorController.

i.e. For SALSA

Helper Data:

  • <Animator> controllerVars[componentIndex].animator: Animator with configured parameters.
  • <int> controllerVars[componentIndex].blendIndex: index of Animator parameter.
  • <bool> controllerVars[componentIndex].isTriggerParameterBiDirectional: only applies to Trigger parameter types.

Example: To configure a animator controller's data (continuing on from the SALSA example on the previous page):

NOTE: This is not a fully operational copy/paste example since some variables will need to be set from your specific project implementation.

// ...
// continuing from the SALSA example...

Animator animatorToManipulate; // you will need to set this... 

// Since the previous example set this to a 'shape' controller, change the controller type to 'animator'...
expressionComponent.controlType = ExpressionComponent.ControlType.Animator;

// cache the controllerVar data -- assuming the first component in the expression.
InspectorControllerHelperData controllerVar = expressionData.controllerVars[0];
controllerVar.animator = animatorToManipulate;
controllerVar.blendIndex = indexOfAnimatorParameter; // selects the parameter you wish to animate.
controllerVar.isTriggerParameterBiDirectional = false; // only applies to Trigger parameter types..

Return to the Runtime Setup documentation to finalize by baking the controller helper data into the ExpressionController.

NOTE: We have tried to make the above information useful and complete. Please let us know if you discover errors, omissions, or need some clarity.