skip to Main Content

How to use the asset in your project

Select from the top menu “GameObject / 3D Object / World Map 2D Edition- Main Map” option. You can also drag the prefab “WorldMap2D” from “Resources/Prefabs” folder to your scene. A WorldMap2D Game Object will appear in the hierarcy of your scene. Select it to show custom properties:

Custom Inspector Properties

Fit Width/Height/Center Map: controls and center how the map can be moved over the screen.

Render Viewport: when it has assigned a viewport gameobject, the map will show inside that viewport instead of the normal gameobject. Read “Using the Viewport feature” for more details.

Show Earth: shows/hide the Earth. You can for example hide the Earth and show only frontiers giving a look of futuristic UI.

You may want to not hide the Earth, but instead use the CutOut style, which will hide the Earth, but will prevent the geographic elements and lines to be seen when they’re on the back of the sphere.

Earth Style: changes current texture applied on the Sphere of the prefab.

Show Latitude/Longitude Lines: will activate/deactivate the layers of the grid. The stepping options allow you to specify the separation in degrees between lines (for longitude is the number of lines).

Grid Color: modifies the color of the material of the grid (latitude and longitude lines).

Show Cities: activate/deactivate the layer of cities.

  • Min Population (K): allows to filter cities from current catalog based on population (K = in thousands). When you move the slider to the right/left you will see the number of cities drawn below. Setting this to 0 (zero) will make all cities in the catalog visible.
  • Show Frontiers: show/hide all frontiers. It applies to all countries, however you can colorize individual countries using the API.
  • Frontiers Detail: specify the frontiers data bank in use. Low detail is the default and it’s suitable for most cases (it contains definitions for frontiers at 110.000.000:1 scale). If you want to allow zoom to small regions, you may want to change to High setting (50:000:000:1 scale). Note that choosing high detail can impact performance on low-end devices.
  • Frontiers Color: will change the color of the material used for all frontiers.
  • Thin Lines: when set to true, country frontiers lines won’t get thicker when zooming in (useful for VR and mobile).
  • Country Highlight Enabled: when activated, the countries will be highlighted when mouse hovers them. Current active country can be determined using countryHighlighted
  • Country Highlight Color: fill color for the highlighted country. Color of the country will revert back to the colorized color if used.
  • Draw Outline and Outline Color: draws a colored border around the colorized or highlighted country.
  • Include All Regions: when enabled, all regions of the current highligted country will be highlighted as well. If disabled (default behaviour), only the territory under the mouse will be highlighted. For instance, if you pass the mouse over USA and this option is enabled, Alaska will also be highlighted.
  • Show Country Names: when enabled, country labels will be drawn and blended with the Earth map. This feature uses RenderTexture and has the following options:
  • Relative Size: controls the amount of “fitness” for the labels. A high value will make labels grow to fill the country area.
  • Minimum Size: specifies the minimum size for all labels. This value should be let low, so smaller areas with many countries don’t overlap.
  • Font: allows you to choose a different default font for labels (factory default is “Lato”). Note that using the decorator component you can assign individual fonts to countries.
  • Labels and shadow color: they affect the Font material color and alpha value used for both labels and shadows. If you need to change individual label, you can get a reference to the TextMesh component of each label with Country.labelGameObject field.
  • Show Provinces: when enabled, individual provinces/states will be highlighted when mouse hovers them. Current active province can be determined using provinceHighlighted
  • Show Cursor: will display a cross centered on mouse cursor. Current location of cursor can be obtained with cursorLocation property when mouseOver property is true.
  • Navigation Time: time in seconds for the fly to commands. Set it to zero to instant movements.
  • Autorotation Speed: will make the Earth continuously rotate around its axis. Set it to zero to disable autorotation.
  • Allow User Rotation: whether the user can rotate the Earth with the mouse. You can implement your own interactions setting this to false and modifying the rotation / position fields of the gameObject transform.
  • Allow User Zoom: wether the user can zoom in/out the Earth with the mouse wheel.
  • Zoom Speed: multiplying factor to the zoom in/out caused by the mouse Wheel (Allow User Zoom must be set to true for this setting to have any effect).
  • Screen Edge Scroll: enables auto displacement of map when mouse is positioned on the edges of the screen.
  • Static Camera: by default, it’s the camera that moves when user drags or zooms in/out. If you set this property to true, the map will move itself, not the camera.

Choose Reset option from the gear icon to revert values to factory defaults.

Back To Top