Search Unity

AnimatorStateInfo.name error

Discussion in 'Developer Preview Archive' started by hxx2010, Oct 22, 2012.

  1. hxx2010

    hxx2010

    Joined:
    Aug 31, 2009
    Posts:
    155
    MecanimTute

    Assets/Scripts/BotCtrl.cs(68,37): error CS1061: Type `UnityEngine.AnimatorStateInfo' does not contain a definition for `name' and no extension method `name' of type `UnityEngine.AnimatorStateInfo' could be found (are you missing a using directive or an assembly reference?)

    my unity3d 4.0.0b12
     
  2. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Due to performance reasons the name field has been removed. You should use the method stateInfo.isName("Base Layer.Run") as this allows the compiler to make much faster code, especially for mobile platforms.

    I'll ask Will for a link to an updated tutorial project.
     
  3. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    794