How it Works - UI

UIMapContent

The main UI component is the UIMapContent component. This component listens to MapManager events and draws and updates the UI in response to these events.

The UIMapContent should be added to a GameObject that is a child of your UI canvas. You can add multiple UIMapContent objects to support multiple map views (for example a mini-map and a full map).

UIRoom

When a MapRoom is revealed a UIRoom component is created. You can provide your own UIRoom component by creating a prefab which contains a UIRoom and assigning it to the roomPrefab variable of the UIMapContent component. If no prefab is present a GameObject with a UIRoom component and an Image component will be generated automatically.

UIPointOfInterest

When a Point of Interest is revealed a UIPointOfInterest component is created.

NOTE: You can turn off PointOfInterest creation by setting the PointRenderType variable to DONT_SHOW in the UIMapContent settings.

You can provide your own UIPointOfInterest component by creating a prefab which contains a UIRoom and assigning it to the pointPrefab variable of the UIMapContent component. If no prefab is present a GameObject with a UIPointOfInterest component and an Image component will be generated automatically.

CurrentRoomIndicator

To indicate the room the player is currently in a current room indicator component is transformed to the position of the current room whenever the current room changes. The Current Room Indicator should be created in your scene as a child of the UIMapContent visibleContent (if visibleContent is null place the Current Room Indicator GameObject as a child of the UIMapContent). You can use any combination of GameObjects and UI components for your Current Room Indicator.

NOTE: The current room indicators size is scaled along with the room size, if you wish to have a room indicator that does not scale see: Creating a fixed size Current Room Indicator.


As an alternative to, or in addition to, the Current Room Indicator you may wish to show the players exact position on the map. To do this you can create a GameObject in your UI canvas and attach the UIPlayerIndicator component. This component will be transformed (and optionally rotated) to match the players position on the map.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk