Hello!
So I have the project based on ‘CastleDemo’ sample.
The scene rotation is menu-> game -> menu -> game
Once the game loaded first time everything is perfect. Ater game ends I use cleanup and composer.goToScene(“menu”)
However when I go to game scene again I have a crash from mte: mte.lua:11072 attempt to index upvalue masterGroup (a nil value).
Any ideas what could go wrong or were shall I look into?
Thanks in advance
It’s a very deep question, and the conclusion is a bit painful. Now i’m gonna assume you have display objects being used in Tiled editor that are called in the program? When I wrote my code I would automatically try to clean out objects when I changed maps or when they are not being used as common practice and the MTE engine since you are using cleanup tries to do the same thing.