Lifebar above enemy in 3d room

hello i need to know how to make a lifebar above my running enemys. This time i make a first person shooter game.

My first idea is to take a GUITexture, put this on top of the enemy and …lookAt Camera of player?

Is this a good solution, or otherwise better?

Any ideas or code please?
thanks

Just calculate the position of the point above your enemy for example:
Vector3 lifebarpos = target.transform.position + new Vector3(0.0f,2.0f, 0.0f);
Then just transform the Worldposition into Screen Coordinates with Unity - Scripting API: Camera.WorldToScreenPoint like:
Vector3 screenpos = camera.WorldToScreenPoint(lifebarpos);
Then draw your GUITexture there.

If you have more enemies on screen at the same time GUITextures are not really recommended. They don’t batch. So, 5 enemies = 5 draw calls for their health bar. You are better off using billboarding planes and a modified texture scroller for the job.

thanks