Going crazy on how to add a simple text onto a scene made up of gameobject made out of sprites?

I am sorry if i have not framed my question

properly.

As you can see in the image I want the text to be on the coin(to count the number of coins collected ).but it doesnot work , because even when the 3d text comes in front of the 'timeout panel image ’ , it shows only the timout panel. !!!

I tried using canvas but its no a feasible option as I dont want to individually add 100s of ui image on canvas and manually put one corresponding sprites on them. [or is there an easier way do tell me ]

so,
How to I add atext for counting coins on the coin? please tell me

Thanks in advance

I’ve not messed too much with the UI stuff.
I see in the image the Z value is -3.61. Does increasing the Z value to a positive number help?

1 Like

thats exactly what i also though. Surprisingly even when the 3d text is in front of the image. The image only is shown.

Have you looked int sorting layer and order in layer for the UI objects?
Another option (shouldn’t have to do this - last resort) you could render the UI with a different camera to make sure it is rendered always on top.

1 Like

3d text objects dont have sort order option , only sprites have it .My text is a 3d text.Yes using different camera , i havent tried , Ill keep that as a last option. thanks anyways for your time

Every Renderer does have the sortingLayerID/Name and sortingOrder, which you can set from a script to control the render order. You can also make a general SortingLayerOverride-component that adjusts the values for the renderer of the attached game object. Or a new Inspector Editor script that expands on the default MeshRenderer inspector and exposes the sorting layer.