Search Unity

Animator parameter checking

Discussion in 'Animation' started by jtdev, Apr 13, 2014.

  1. jtdev

    jtdev

    Joined:
    Apr 13, 2014
    Posts:
    9
    Hi guys,

    Can we get a way to check if an Animator parameter exist? I see we can 'logWarnings=false' but it helps knowing during some initialization code when dealing with complex controllers.

    Thanks!
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,601
    Hi,

    The way your question is worded, I'm not sure if you're requesting that Unity add this feature, or asking if it already exists. To my knowledge, it doesn't exist for general runtime use. If you're only running inside the Unity editor, you can use the UnityEditorInternal namespace and call AnimatorController.GetEffectiveAnimatorController(animator) and AnimatorController.GetParameter(index), but these are undocumented and, again, only work inside the editor.

    If you want this added to Unity, suggest it on http://feedback.unity3d.com/