Search Unity

Animator.GetCurrentAnimationClipState error

Discussion in 'Windows' started by Vesa, Aug 20, 2013.

  1. Vesa

    Vesa

    Joined:
    Dec 14, 2012
    Posts:
    4
    Hi,

    Animator.GetCurrentAnimationClipState does not compile for Windows Store Apps. It works in the editor.

    Example CS-code:
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class PlayerAnimatorController : MonoBehaviour {
    6.  
    7.     public Animator animatorComponent;
    8.     void Update () {
    9.         AnimationInfo[] animationInfos = animatorComponent.GetCurrentAnimationClipState(0);
    10.     }
    11. }
    12.  
    Error-message:
    Assets\Scripts\PlayerAnimatorController.cs(8,60): error CS1061: 'UnityEngine.Animator' does not contain a definition for 'GetCurrentAnimationClipState' and no extension method 'GetCurrentAnimationClipState' accepting a first argument of type 'UnityEngine.Animator' could be found (are you missing a using directive or an assembly reference?)

    Any ideas how to get it working?

    Thanks.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    Unfortunately GetCurrentAnimationClipState() and GetNextAnimationClipState() is not yet supported for Windows Store Apps, as well as Windows Phone 8 and Flash.
    There is work in progress on this, but I can't tell, when we will have this support.
     
  3. Tasarian

    Tasarian

    Joined:
    Oct 25, 2012
    Posts:
    1
    Any idea when this may become supported ? Its a blocking issue on converting various pieces of Software to the windows app store and window surface.


     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,919
    Yes, this will be supported in 4.3.

    And 4.3 is almost around the corner, just wait a bit longer.