Need help (Overlapping texts on prefabs)

First of all, sorry for my bad English and I’m also a total newbie in unity.

I have this problem with my 2d prefab. My spawner works well, the mobs are moving perfectly. My problem is when the time a prefab overlays each other, the text always overlaps the other prefab.

I want to just fix the text on every prefab without overlapping each other.
Please help.

here is a screenshot

I’m not sure what you’re trying to do here. My guess is you want to change the sort order of your prefab so that it sorts behind instead of in front of the image? If so, I’m curious why you have the prefab text in the first place, but ignoring that, if your prefab it in the UI space, I don’t think you can alter that. You can put it into world space and have it sort like any other object though. This is controlled by the canvas. If your prefab is already a game object in the world then you need to alter the sprite render’s sorting layer and/or order in layer depending how you want to do it.

Thanks for the answer, sorry I didn’t mention what I’m making.

I’m currently developing a educational shooting game, its just a 2d shooting game where the player shoots bullets on enemies to gain score but in my game you have a set of bullets (eg. mammal, fish, reptile bullets) and the enemy spawn carries texts (eg. dog, snake, shark).
The player then need to fire bullets corresponding on what the enemy is carrying in order to gain score.

Ah, okay, that makes sense. Yeah, knowing that. My guess from the picture is that you are using a UI canvas in the UI space to show the text parts, which is why it is always sorting in front, so yeah, you’d need to move that into world space instead.

Thanks man, you’re a life saver.
I think I got it now