Search Unity

AnimatorControllerPlayable entry conditions evaluation

Discussion in 'Animation' started by ZAXIS, Oct 11, 2019.

  1. ZAXIS

    ZAXIS

    Joined:
    Sep 30, 2016
    Posts:
    23
    Assuming a simple playable api creation with a single animator controller node, with a graph that looks like this:

    upload_2019-10-11_12-45-12.png

    A single boolean condition decides whether go left or right

    The code is as followed:

                
    var ctrl= AnimatorControllerPlayable.Create(m_graph, controller);
    ctrl.SetBool("isFacingRight", IsFacingRight.Value);

    m_mixer.ConnectInput(0, to, 0);
    m_mixer.SetInputWeight(0, 1f);


    So it seems that there is no way to set that boolean prior Entry node evaluates its conditions,
    and the only workaround would be to have an empty state before the split.

    Should this be reported as a bug?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    The controller doesn't transition in from the entry node, it starts directly in the default state (orange). This is by design, though as with the majority of the Animator Controller system I find it to be a stupid design.
     
    ZAXIS likes this.
  3. ZAXIS

    ZAXIS

    Joined:
    Sep 30, 2016
    Posts:
    23
    Makes sense, thank you