BCE0019: 'animation' is not a member of 'Object'.

Hi All,

Updated from 4.0.0f7 to 4.0.1f2 … Now, I get BCE0019: ‘animation’ is not a member of ‘Object’.

Any ideas?

Thanks in Advance!
Oliver :slight_smile:

----CODE

var charAnim1 = new WWW (urlString);
currentWWW = charAnim1;
yield charAnim1;

var Animations1 : Object[ ] = charAnim1.assetBundle.LoadAll(Animation);
var clipName1 : String;

//print(Animations1.Length);

clipName1 = Animations1[0].name.ToString();
//print(clipName1);

characterObj.animation.AddClip(Animations1[0].animation.clip,clipName1);
characterObj.animation.Play(clipName1);
characterObj.animation.wrapMode = WrapMode.Loop;

Is your animation set to legacy?

Yes, legacy, thank you for the reply. Was working fine in 4.0 just not todays update of 4.01… seems to have a couple of the same problems else where…

Also this

BCE0019: ‘name’ is not a member of ‘Object’.

in the same block of code…

Can I declare the variables earlier in some fashion… and segment it out… I’m not a total javascript guru.

Thanks again,
Oliver

“name” is indeed not a member of Object. Use the actual type, rather than Object. Also, http://forum.unity3d.com/threads/143875-Using-code-tags-properly

–Eric

Hi Eric,

Thank you for the reply, but I don’t understand how to fix? Do you happen to know why it may have been working in 4.0.0 and not 4.0.1?/

Thanks!
Oliver :slight_smile:

  • Bump Please :slight_smile:

Sorry i was off for the day. It would help me if you posted the whole script so i can plug it in to unity on my side and figure out what is wrong.

Bikebreck