Scripted animation not working on [windows phone / windows store apps]

Hello community,

I have a script that is creating animation at run-time.

The script has been tested and working on the following:

Editor (all platforms)

Android

iOS

When trying to run it on either windows 8 phone or windows 8 store, the script isn’t working.

It’s not giving any errors or any other indication to why its not working.

To make it clear: the app is compiled and deployed successfully to a device, just the animation isn’t playing…

The script is pretty big so I don’t want to post in here.

Any ideas? (if there are specific parts of the code you might want to see, let me know)

Thanks!

What debugging have you done to try to find the issue? Just saying “a script isnt working” without any logs will be very difficult to fix on the forums.

Try debugging out information throughout the script to see what the state is in various places. It might be failing quietly without you knowing.

I did that (sorry for not pointing that out).

All parts of the script are being called, all values are correct… I really couldn’t see anything wrong.

Hi,

could you copy-past a code snippet how you’re creating that animation.

Just in case, not sure if you’re using this exact feature, but animated scripting variables doesn’t work on Windows Store Apps/WP8 (the ones animated in Animation Window)

Cheers

This is how I do it in it’s basic form (I’m aware of animated scripting variables not working and I’m not using such a thing):

AnimationCurve posXcurve;
var Xkey = new Keyframe(startTime, fromX, prevInTangent, prevOutTangent);
posXcurve.AddKey(Xkey);
_clip.SetCurve("", type, curve.Key, curve.Value);
_target.animation.AddClip(_clip, _clip.name);
_target.animation.clip = _clip;
_target.animation.Play();

The curve is a Dictionary.
The key is the property name and the value is the actual curve.

The _target is the game object that I want to animate.

I am sorry, but this is exactly animation of scripting variable… " animated scripting variables not working" exactly means that it’s currently not possible to animate class properties.

But I’m animating stuff like “localPosition.x” property…
if that’s not possible, then you can just say: its not possible to create animations via code in windows 8

Animating class variables is not possible, it doesn’t matter if you attach that animation via Animation windows, or do it through code…

The localPosition.x is part of the Transform, not any class I made my self.

And when manually animating it in the animation window, it does work.

Just in case submit a bug. Maybe you’re right, hard to tell without a repro project.

Hey, submitted a bug report.

Case: 576101

Thanks!

FYI:
I’ve got a clean repro of what may be your problem. My animation appears to do nothing, too, but I think it just runs instantaneously or something.
http://forum.unity3d.com/threads/212146-BUG-AnimationClip-length-wrong-on-Win8

hmmm, this is interesting, didn’t think about trying to look at the animation length.

I can tell you one think tho, I think the animation is playing, but only te first frame or something like that.

If you try to do a scale animation and set the first frame to be at a smaller scale then the original scale of the object in the scene, you will see that it does scale down, but if in the animation you scale it up over time, that isn’t working.

Hi, can you tell me if this a known Unity issue that will be fixed, or a limitation of the platform?

It’s a bit of a showstopper for us as we’re trying to animate alpha of an NGUI component to fade images in and out.

Thanks!

Unity replied to my bur report and said they have passed it on the dev team

We fixed the issue, hopefully it will be available in 4.3.2. Thank you for reporting the bug.

Great! cant wait :slight_smile:

Hey!, just noticed the bug is still on “open” status.
You might wanna change that :wink:

That’s normal, while it’s fixed, our QA still needs to confirm that, and only then it will be closed.

Ok, cool.