Dowload as PDF

1.7. Variables

This entity is one without an editor. Essentially, it's wrapping for parameters of AnimatorController, but with some bonuses:

  1. IVariableProcessor – an interface, by implementing which and setting it in Controller.VariableProcessor quality you can get control over how variables receive and set values. By default Controller simply installs values and receives them with the help of AnimatorController. This could be useful, if, for example, it is necessary to synchronize values of parameters across network, log them, send them to a child object, etc.
    > It's important to understand, that upon redefining this quality, the realization of interface in Mecanim Animator needs to send and receive date, this will not be done automatically.
  2. Binding – every variable will have attached get/set delegates, using which the variable will send it's value to user code every frame… or receive values from there and set it as it's new value.
    > Binding is used for syncronizing the value of Curves with variable, because if the code will set different biding, then connection to the curve will be lost. You can also set more complex connections with not just curves, but other variables using binding through code.
Yes No
0 of 0 users found this section helpful
Suggest Edit