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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Where's AnimatorClipInfo?

Discussion in 'Editor & General Support' started by Marzoa, May 21, 2015.

  1. Marzoa

    Marzoa

    Joined:
    Dec 2, 2012
    Posts:
    50
    According to this:

    http://docs.unity3d.com/ScriptReference/Animator.GetCurrentAnimationClipState.html

    public AnimatorClipInfo[] GetCurrentAnimationClipState(int layerIndex);

    So I try to do:

    AnimatorClipInfo[] clipInfos = MyAnimator.GetCurrentAnimationClipState (0);

    And the compiler keeps complaining about "The type or namespace name `AnimatorClipInfo' could not be found. Are you missing a using directive or an assembly reference?"

    It is a MonoBehaviour C# scripts that includes:

    using UnityEngine;
    using System.Collections;
    using System.Collections.Generic;
    using System.Text;

    I think it should be right in UnityEngine, but it doesn't seem to be the case...

    Do you know where is it?

    PS. This is in Unity 4.6, it seems in 5.x this whole thing have disappeared but I am not migrating to 5.0 anytime soon.
     
  2. Marzoa

    Marzoa

    Joined:
    Dec 2, 2012
    Posts:
    50
    Ok, I realized the documentation is wrong. Such function actually returns AnimationInfo, not AnimatorClipInfo type.

    Thanks for nothing.