Unity Plugin

Points of Interest

General

A Point of Interest is simply a spot in the world. It is exactly defined through its geographical position, not an area, a shape, or borders. Nevertheless, COALA can generate POIs out of shapes if it is needed. (Tip: You can simulate this by abusing the Thoughtfish.Coala.Core.Shape class. Add a bunch of positions, then access the point through the center property.)

Before you can generate a POI with COALA, you have to define it in the Points of Interest section in the back-end.

(Tip #1: When creating a project in our back-end, select the PaperMap template to generate a predefined set of the settings that match the PaperConfigPOIs asset provided with this plugin.)(Tip #2: You can add CoalaTags to the POI generation to get more complex Points of Interest. For example, this would allow you to let a "Master Thief Lord" spawn only in bars at midnight between 12 am and 4 am. Check out the possible CoalaTags in the back-end's Support section.)

The POI Config asset

As already mentioned here, you can use the POI Config asset to convert the POI data from a COALA response to an object in the scene/world. This configuration asset is designed in a way that lets you use any prefab as a POI. This gives you great flexibility for whatever your POI should do. The only limitation is your imagination! Some examples could be

  • a Point of Interest that only reacts to the player if they are close enough

  • an interactable POI through clicking or performing a specific action depending on the POI type

  • a POI that initiates random encounters in combination with the decoration system. (An example of this is available here.)

If you feel lost with this, have a look at the "PaperMap" project template in the COALA back-end (in the Add new Project screen) and the prepared configuration asset in this package:

FAQ - Working with the asset

I have changed the values but the map is not affected.

  • Use the Visualization tool in the COALA back-end.

  • Increase the internal version number if you want to apply your changes in the COALA back-end.

  • Ensure that you are using the configuration asset that you have changed.

  • Analyze the raw COALA response and search for your POI. To do this

    • copy the request from the Visualization tool

    • paste it into your browser's address field and execute

    • use the browser's search function (usually Ctrl + f) and look for the name of your POI (POITag)

Make sure the Label field in the POI configuration asset matches the POITags field in the COALA back-end.