gree / lwf

LWF - Lightweight SWF
http://gree.github.com/lwf/
zlib License
627 stars 167 forks source link

LWF loads on scene during game preview but fails to load on game itself. #89

Closed grooovylim closed 9 years ago

grooovylim commented 10 years ago

Hi,

I've been trying to get my swf (lwf) to load on game play but to no avail.

Here is what I see in the game preview, the animation doesn't load: image

But on the scene preview, the file loads fine: image

May I know how should I go about troubleshooting this?

splhack commented 10 years ago

hmm, any error messages? How was LWFObject layer setting, Z depth, ...?

grooovylim commented 10 years ago

Hi splhack,

There is no error message. So far as I know, I did not do anything to the layer setting and Z depth.

I am using Unity 4.6 Beta.

I've extracted that particular scene and if it is okay, you can download and have a look: https://www.dropbox.com/s/llzy0jmdwr33185/LWF%20Sample.zip?dl=0

Appreciate if you can advise me on what I am doing wrong here. Thanks!

splhack commented 10 years ago

The reason is that you are using uGUI. AFAIK, uGUI renders at the end of the frame. we're thinking sort of LWF uGUI Renderer to solve the issue, but right now I think you might need to use RenderTexture for rendering something on uGUI.

grooovylim commented 10 years ago

Hi,

Thanks for the answer, so if to say I were to use RenderTexture like you mentioned, how should I go about integrating LWF output on the texture map?

splhack commented 10 years ago

Please take a look at uGUI demo project http://forum.unity3d.com/threads/ui-example-project.263418/ . It has RenderTexture demo, and LWF does not use so special rendering, so I guess, you can do it out of the box with the demo. good luck.

splhack commented 9 years ago

Could you try the latest code? LWFObject now has UseUIVertexRenderer() API for selecting a renderer that works well on/with uGUI.