Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer rendering timeline #156

Closed
DelSystem32 opened this issue Jan 4, 2016 · 3 comments
Closed

No longer rendering timeline #156

DelSystem32 opened this issue Jan 4, 2016 · 3 comments

Comments

@DelSystem32
Copy link
Contributor

Until today I was using LWF from a couple of months ago (I downloaded it 6oct2015). Today I downloaded a new version of LWF and suddenly a flash no longer animates. It's a 3 FPS flash with two keyframes on its timeline.

lwfObject.UpdateLWF(Time.deltaTime);

Had worked fine in LWF until now. Any idea what have changed code-wise during these months?

It appears that it is indeed advancing on its timeline, just no longer rendering any changes. I've tried:

lwfObject.UpdateLWF(Time.deltaTime);
lwfObject.lwf.Render();

But it does nothing. The following...

lwfObject.UpdateLWF(Time.deltaTime);
lwfObject.lwf.ForceExecWithoutProgress();
lwfObject.lwf.Render();

...does work on a different 10 FPS flash but not on the 3 FPS flash. I have no idea why it works on one and not on the other. Also, why do I need to call ForceExecWithoutProgress? UpdateLWF was just called (with progress).

Seems like you've changed something fundamental but there's no changes appearing on the interface. What has changed, what am I doing wrong? Why isn't UpdateLWF() rendering the flash like it used to?

@DelSystem32
Copy link
Contributor Author

I just don't understand what has changed... Did you make some kind of optimization that will prevent something from rendering even though Render() is called?

I'm a little frustrated because I had just gotten things working as it should in the previous version of LWF from October and I was about to release my project today. Then it turned out something has changed internally that I can't find and I my release is delayed.

Is there something I can call that will 100% force everything to render? Even if the MovieClip hasn't been set as "dirty" or anything like that?

@DelSystem32
Copy link
Contributor Author

Found the problem, it was as I thought an optimization from these two commits:

7490ab0
b510ddb

If I remove this new "needsUpdate" completely there is no problem any more, it will always render.

When lwf.updateCount is 0 the needsUpdate boolean never becomes true in "lwf_uivertex_factory.cs" or "lwf_combinedmesh_factory.cs".

lwf.updateCount is only increased in lwf.Update(), which is only called from:

  1. Exec() in "lwf_core.cs" if needsToUpdate is true
  2. UpdateAttachedLWF() in "lwf_movie.cs" if needsUpdateAttachedLWFs is true

So it turns out that lwf.Update() is not always called even if it should be called. I dunno why. lwfObject.UpdateLWF(Time.deltaTime); should in turn call Exec(). However for some reason "needsToUpdate" inside Exec() is never set to true, even though the timeline advances for the root MovieClip.

The currentFrame in LWF.Movie changes between 1 and 2. However lwf.updateCount will not increase for some reason and therefore the new frame does not render. There is a bug here.

@DelSystem32
Copy link
Contributor Author

This issue has been fixed in my fork, please merge it with the master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant