How do I make GUI to appear on a game object instead of rendering it on screen?

I am making a health bar, and I want it to appear on a device in game. How do I map the GUI to a particular game object?

Use new UI system instead of programming GUI. Create new Canvas as a child of object with “World Space” render mode selected and attach health bar image to this.