Dowload as PDF

1.9. Attributes

For easier work with Animator and MecanimCallbacker data you can use following attributes:


  1. AnimatorBoolParameterAttribute – attribute for selecting boolean parameters from target animator.
  2. AnimatorFloatParameterAttribute – attribute for selecting float parameters from target animator.
  3. AnimatorIntParameterAttribute – attribute for selecting int parameters from target animator.
  4. AnimatorTriggerParameterAttribute – attribute for selecting trigger parameters from target animator.
  5. AnimatorStateAttribute – attribute for selecting states from target animator.


  1. CallbackerCategoryAttribute – attribute for selecting category from target preset.
  2. CallbackerGroupAttribute – attribute for selecting group from target preset.
  3. CallbackerCurveAttribute – attribute for selecting curve from target preset.
  4. CallbackerEventAttribute – attribute for selecting event from target preset.

О параметрах аттрибутов

  1. sourceSearchMode is where search occurs for the source (AnimatorController или Preset). It's necessary to understand, that when using this parameter, the search will happen not for assets themselves, but for components of Animator or CallbackerController. Afterwards the found component will be used for getting a link to the asset. Possible variants: ThisObject (used by default) – search for the components in the current object. Childs – search for the first matching component in the current object and its children. Parents – search for the first matching component in the current object and its parents.
  2. memberPath – name of the member (field, property, method) that will be used for getting AnimatorController or Preset. When using this parameter you can have more flexibility when specifying source of data. This member can't be static and needs to return required type (in the case of methods, it can't have parameters). Also, this member can return not only AnimatorController or Preset, but Animator or CallbackerController as well.

These parameters are mutually exclusive. sourceSearchMode has priority.

Yes No
0 of 0 users found this section helpful
Suggest Edit