Search Unity

Animator.GetBehaviour() clarification

Discussion in 'Animation' started by Zergling103, Jun 30, 2016.

  1. Zergling103

    Zergling103

    Joined:
    Aug 16, 2011
    Posts:
    392
    In the documentation for GetBehaviour(), it isn't clear as to where it searches for behaviours.

    What layer(s) does it search in?
    What state(s) does it search in?
    If there are nested state machines, does it search in those states?

    "First" doesn't really give much context. It implies that it somehow iterates through all of the states that exist in the Animator until it is found. That is, all states of all layers, and all nesting depth levels.

    If someone could provide clarification it'd be greatly appreciated! :)
     
  2. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Last edited: Dec 6, 2016