Iris-Engine icon indicating copy to clipboard operation
Iris-Engine copied to clipboard

Lua garbage collector can destroy objects that are currently visible

Open diegodan1893 opened this issue 7 years ago • 0 comments

If there are no references to an object in Lua (for example, a local variable that goes out of scope), that object will be destroyed by the garbage collector. If that object was a Sprite and it was visible, the player will be able to see how it disappears from the screen. The destruction is done safely, so the game won't crash or anything, but I don't think this should be the intended behavior.

This is the reason why the "openScript" Lua function hides all the objects in the scene except for the background.

diegodan1893 avatar Aug 02 '18 17:08 diegodan1893