Hello all,
I just profiling my app and found an output that I cannot understand.
The screen in question is a scrolling page, it consists of 10 pages that are dragged along. 2 pages are visible at a time, the rest gets disabled. All share one texture to reduce draw calls.
At init, all disabled pages report back as having an animation (as the pages get dragged along the screen, the amount of GUI.Animations reduces and finally, the profiler reports no more animations).
According to the manual, “Disabled nodes are not rendered and animations acting on them are not evaluated”.
I am quite curious and would like to understand what is happening.
If you add a gui.animate() call to each node and then disable them I guess they still have one animation each. This is reasonable and I would expect this to be seen in the profiler.
I’m not entirely sure what happens to the animation if you enable and disable multiple times during the duration of the animation. My guess is that the property that is animated (for instance position) only gets updated when the node is enabled and left at its current value while disabled.
I agree, this makes sense. But… there is no gui.animate() call, all the nodes do is share one atlas that consists of one image. And if I comment the line in init out, the profiler does what I expect, report no animation:
Oh, sorry, I thought you used gui.animate? Then I can’t explain what they gui animations are. Can you reproduce the same result in a small sample project?