Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question [Playables] Get AvatarMask used by AnimationLayerMixerPlayable

Discussion in 'Animation' started by FelipeReis, Nov 1, 2020.

  1. FelipeReis

    FelipeReis

    Joined:
    Jan 27, 2012
    Posts:
    38
    Hey, I am trying to record several information of the playable graph used by an animator,
    one of the key info that I need is retrieving which mask an AnimationLayerMixerPlayable is using for each layer.

    Is there a way to know this?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,321
    There's no way to get it back, you just have to remember what you set.
     
    FelipeReis likes this.
  3. FelipeReis

    FelipeReis

    Joined:
    Jan 27, 2012
    Posts:
    38
    Ahh thank you for the answer,
    Yeah, i'm making a tool to debug animation and record info about the playables behind it,
    so I need something that works in this level or at least a way to get the list of bones.
    Guess I will need to look into the runtimecontroller itself
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,321
    I don't think you can get any info about layers from the runtime controller, but if you cast it to a UnityEditor.AnimatorController you can go through all its details (in the Unity Editor only).
     
    FelipeReis likes this.