Hello,
I am new to Defold and am slowly picking up game development.
I am experiencing a weird behavior while trying to accomplish something simple:
- First, I created a collection with a GO that contains 3 layers of sprites (background). I set the Z index of the sprites accordingly. It appears correctly from the preview screen.
- Next, I created a GO that is just a simple bubble.
- When I place both these two items in the main.collection, the bubble GO seems to fall between the background layers. I want it to be at the topmost.
- So I started fiddling with the Z index (the third position input field… I’m assuming that’s the Z-Index) of the bubbleGO and the background collection on the main.collection. And suddenly the bubble is not appearing anymore – it’s displaying correctly on the preview screen but when built, the bubble is not appearing, and the order background collection seems to shuffle randomly.
The only script I placed in was for the bubble GO to make sure that init was called.
The behavior is consistent as I’ve tried restarting from scratch a couple of time, and the bubble GO always goes missing after playing around with the Z index, and even when i remove the bubble GO and re-add it in, it is still not appearing.
I feel that I’m missing something very fundamental here, would appreciate any help offered here, thanks a lot!
Best regards,
VT