How do I attach a Camera to a GUI (for a Mini map)

Pretty much what the question says. How do I attach a second camera to a GUI box (or whatever shape) in order to create a mini map. The camera would obviously be above the player and follow him showing a top down view of the landscape.

I'm also open to other suggestions to achieve these results for a mini map.


Create a second camera and modify the values for the Normalized View Port Rect.

Attach the 'Smooth Follow' script (Component -> Camera Control -> Smooth Follow), set your player as target and modify the values for height, distance and damping.

You then have adjust the values for depth, clip planes and maybe the clear flags.

Also you could use layers to render only a part of the scene for your mini map.

What i did is just i created a second camera and fixed the values in the NORMALIZED VIEW PORT RECT, be sure to set the depth to 1 or if not higher to overlap the game scene. I placed the second camera high above to have a full view and placed flat circle objects on top of my player (make it higher than the character so the player wont see it) and also for the enemies. Its working but im having problems when screen resolution is changed.

Just checked the Unify Wiki page for scripts, and came up with this:

I've never used it but it looks like it has what you're looking for.

Hi, you can checkout our KGFMapSystem in the assetstore.

Its a robust and easy to integrate minimap/map solution and it solves the most minimap problems out there. All our users are very happy with it and we deliver excellent support if you have any questions.