Keep Image size while zooming in/out

My problem is the following: I have a 3d scenario with an enemy inside. I want my enemy to have an Image over him (like in the sims for example), but I want this image to keep his ratio, so it will look the same no matter how much zoom in/out I will do. I don’t even know where to start looking at -.-

Here’s the steps of doing this:

  1. create an separate camera under enemy’s transform and make the camera always looking toward the enemy object.
  2. create a rendertexture either with script or in editor, set the size in terms of 2D
  3. set the camera’s render texture to the render texture you created
  4. create a quad under enemy’s transform and make it above the enemy’s head, write a script to let it always facing to camera(billboard Technic.)
  5. set a material with shader Unlit/Texture and apply to the quad.
  6. set the material’s texture with the render texture you created.
    You can use unity’s layer to only render enemy in the separate camera.

I strongly disagree with yu-wan’s suggestion.

Scale the verts of your flag/icon/marker/whatever in a shader based on object distance from the camera.

Odds are they wouldn’t dynamic batch anyway because of sorting and you’re likely seeing custom property block data anyway. But the shader let’s you bypass all the camera overhead.