in QML, it is possible to change the parent of an item.
But with V-play and the cocos renderer, this doesn’t work the way I’m doing it, especially when it comes to the z-order of those items.
What I’m doing is this:
I have a level which has a grid of tiles, and some other elements.
When I load another level, i want to reuse all the tiles in the grid, so i don’t have to destroy all the entities, and then re-create them.
But when I do this, all the other items appear on top of the tiles that i have re-used. When I enable the QML renderer, everything’s displayed correctly.
So my question is, is it intended to be possible to change the parent of an item in V-play, or do i have to find another way to do this?
Here’s how I’m trying to to this:
t.parent = level
With t being the tile that is re-used, and level being the new level that is being loaded.
Later in the code i call
So that the cocos item gets loaded, but it still seems the tiles all are under their old parent.
Thanks for all the support in advance,