Hi,
I’m doing a match-3 game that doesn’t require heavy animations.
After some gaming time, I receive this:
Warning: “GUI: Out of animation resources (1024)”.
I don’t understand why, because I’m enough sure that I remove all the objects and gui nodes after their usage, and those remaining enabled are 9x7=63 factory elements in the match-3 table, and the gui score counter …
Is there a way to find if there are some resources that remain allocated consuming memory, that I ignore, and which are these resources?
Thanks, Marco
This is from using gui.animate() I believe. Animating a position x,y,z for example costs 3.
You possibly need to do gui.cancel_animation() when you destroy something mid animation?
There probably needs to be a feature request to be able to increase this 1024 limit in the game.project or GUI scene properties but it sounds like something you are doing isn’t using this limit in an expected way.
Use the profile to verify that you are indeed deleting the nodes.
Ok, thanks, I found the problem using the profiler: At a certain moment, my game had more than 900 Gui.ActiveAnimations. When I deleted them, it was too late, the limit was reached (or nearly).
A question to be sure to have understood: when I have this animation running:
gui.animate(small_star, gui.PROP_SCALE, vmath.vector4(end_s, end_s, 1, 0), gui.EASING_NONE, 1.5)
the “cost” of the operation is not 1, but 4 (because of vector4), is it correct?
Thanks anyway, the problem is solved.