gree / lwf

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

render one frame behind in unity #72

Closed r2digi closed 10 years ago

r2digi commented 10 years ago

anyone notice that LWF renders one frame behind in unity in the current implementation? I can tell because as I move items around that aren't LWF objects, if LWF is attached to it it will "lag" behind in movement.

splhack commented 10 years ago

interesting. Could you share the Unity project or could you create a minimum Unity project which can reproduce the problem?

r2digi commented 10 years ago

Hmm tried to make a simple sample but not successful. I think it has to do with the old LWF NGUI code we are using in the project and the Draggable panels in NGUI work together.....going to try and figure it out again ..

r2digi commented 10 years ago

ok i found a way that it works ok now, but there's probably a better way to do it. i tracked down in LWFObject.Update the Render call was made: if (lwf == null) return; lwf.Render();

i wouldn't figure out the sequence of how the matrix is updated well enough so i just moved this Render call to LateUpdate instead and set up LWFObject script execution to be after teh default and the LWF movies now move properly with objects in the scene it's parented to. before it was moving one frame delayed.