skip to Main Content

Programming Guide

You can instantiate the prefab “WorldMapGlobe“ or add it to the scene from the Editor. Once the prefab is in the scene, you can access the functionality from code through the static instance property:

(Note that you can have more WorldMapGlobe instances in the same scene. In this case, the instance property will returns the same object. To use the API on a specific instance, you can get the WorldMapGlobe component of the GameObject).

Structure of the API

To make it easier to find properties and methods in the source code, it has been subdivided in several files with same prefix WorldMapGlobe*:

WorldMapGlobe.cs: contains basic functionality to access the API, like WorldMapGlobe.instance above.

WorldMapGlobeCities: all related to cities. Similar for Countries, Provinces, Mount Points, Earth And Continents, as well as Markers and Lines.

Finally, all properties and methods related with user interaction is available in WorldMapGlobeInteraction.

Basic Concepts

Countries and provinces are entities that have one or more regions. For example, France is a country and has an entry in the map.countries array. The France country object itself has a regions array. A region represent a land surface (for example, the main land is a region, and each island is a different region). Each region has list of points that define a polygon, the area of the region.
Cities and mount points are just coordinates, spots on the map. They don’t have polygons attached.

Back To Top