How to do it...

To create a minimap, follow these steps:

  1. From the Hierarchy panel, create a new UI Panel object (Create | UI | Panel) named Panel-miniMap. Since this is the first UI GameObject to be created in this Scene, new Canvas and EventSystem GameObjects should be created automatically, and the UI Panel should be a child of the Canvas GameObject.
  1. With the Panel-miniMap GameObject selected in the Inspector, do the following:
    • In the Rect Transform, set the alignment to top-right (click the top-right box while holding down the Shift and Alt keys)
    • In the Rect Transform, set Width to 128 and Height to 128
  2. We'll create a Render Texture file to which our minimap Camera will copy its view. In the Project panel, create a new Render Texture ...

Get Unity 2018 Cookbook - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.