I have read that GUI nodes ignore their z position and instead follow a draw order where the first node in the nodes folder is rendered first, so the node after the first node is rendered next, leaving the the second node to be in front of the first node.
I have 3 nodes: a transparent grey box node, a white box and a text node. The transparent grey box node is first in the nodes folder while the text node is last. All have a z position of 0.
It is still the same as before. I have also tried increasing the position of the text node by 0.1 thinking that it will become in front of the transparent box node but it did not work. Also as setting the z position of the game object that the GUI is in as -1 because I had the same issue with labels in another game object where labels cannot be seen unless the position of the game object is lower. But also as setting the z position of the game object that the GUI is in as 1 instead of -1. Nothing worked. I tried everything I can before making this post but I cannot seem to figure out the reason why the text node is covered when it should have been rendered last.
you could try it with layers:
add 2 layers named “back” and “front” (front below back) and assign all fonts to the front layer and all boxes to back layer.
It’s the font you use.
Open the font in your main folder by double clicking on it, then in the properties panel look for “Material”. To the right you will see a icon (arrow pointing to the right), click on it to open the material.
Scroll down to “Tags” and change the value to “text” and run the project.
thank you very much! It also solved an issue where the text nodes are not where they are supposed to be when the game is run in a different computer.
I also came around a problem before uploading the game on GitHub. I was looking for what is only needed to upload on GitHub on Defold but when I tried to open the same GUI that has the 3 nodes, this showed:
I cannot remember doing anything to it that caused this and the other GUIs that I had did not seem to have this problem. So, I just deleted this GUI and create a new one that looks like this GUI and now it can be opened. I still have a copy that have this problem if needed. Do you know what may have caused this?