-
Import WMSK package into your project.
-
From the top menu, select GameObject -> 3D Object -> World Map Strategy Kit Map option.
-
If you want to use the 3D surface feature (also called viewport mode), also click on GameObject -> 3D Object -> World Map Strategy Kit Viewport option.
Select the WMSK GameObject created to show custom properties:
Custom Inspector Properties
Fit Width/Height/Center Map: controls and center how the map can be moved over the screen.
Rest of customization options are grouped in sections:
-
Window settings
-
Viewport settings
-
Earth settings
-
Cities settings
-
Countries settings
-
Provinces settings
-
Interaction settings
-
Path Finding settings
-
Custom Attributes settings
-
Grid settings
-
Miscellanea
Window settings
-
Wrap Horizontally: this option enables infinite horizontal scroll in viewport mode (needs to assign a viewport gameobject in viewport settings). See wrapping the world section.
-
Fit Window Width / Height: forces map to fill current window rectangle, defined by constraints below. Click on Center Map to restore map to the center of the window rectangle.
-
Left / Bottom: sets the position of the left/bottom corner of the map using normalized coordinates in the range of -0.5 .. 0.5 (think of the left/bottom screen corner as being -0.5, -0.5).
-
Clear Constraints: sets current window rect to original values (left = -0.5, bottom = -0.5, width = 1, height = 1).
-
Set Current Rect: assigns current window rect. Useful to capture current rectangle.
-
Zoom Level: the current normalized (0..1) zoom level, used with methods like GetZoomLevel() or SetZoomLevel().
Viewport settings
-
Render Viewport: when it has assigned a viewport gameobject, the map will show inside that viewport instead of the normal gameobject and special features will be enabled. Read “Using the Viewport feature” for more details.
-
Ground Elevation: sets the max. height for the surface when viewport is used.
-
Cloud Layer: enables and customized the cloud layer when viewport is used.
-
Fog of War: enables and customize the color of the fog of war (only when viewport is used).
-
Units Scale Multiplier: control show units positioned on the viewport are automatically scaled. This is a scaling multiplier so when you zoom in into the viewport units can be scaled along the map. You may choose a clamp range so for instance scale of any unit can’t be less than 0.5 its original scale (or more).
Earth Settings
-
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.
-
Style: changes current style applied on the world map. Some styles can imply additional visual effects. See Using Scenic Styles section.
-
Water Color: allows you to change the color of the water when Scenic styles are enabled.
-
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).
Cities Settings
-
Show Cities: activate/deactivate the layer of cities.
-
Cities Color: allows you to change the color of the three classes of cities included (normal cities, region and country capitals).
-
Icon Size: scale multiplier for the cities icon.
-
Min Population (K): allows to filter cities based on metropolitan 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.
-
Always Visible: allows to ignore the minimum population filter for region or country capitals.
-
City icons: you may override the default icons for your cities. Note that the replacement icons should be sprites (you may duplicate the city prefabs in Resources folder and assign a different sprite). If you want to show a 3D icon/game object on the location of cities, you need to populate the map using WMSK_MoveTo() method (see section “Adding your gameobjects to the viewport”).
Countries Settings
-
Show Countries: 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 (30: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 lines. When zooming in, the lines get a littile bit thicker and Outer Color is used for coloring the extra thickness of the line.
-
Country Highlight: when activated, the countries will be highlighted when mouse hovers them. Current active country can be determined using countryHighlighted property (see API).
-
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.
Provinces Settings
-
Show Provinces: when enabled, individual provinces/states will be highlighted when mouse hovers them. Current active province can be determined using provinceHighlighted property (see API).
-
Draw All Provinces: will render all provinces (+4100) borders on the map. Usually this toggle is unchecked what will make only provinces for currently selected country are drawn.
-
Borders Color and Highlight Color: defines the color of the provinces border as well as the highlighting color (when mouse is over).
Interaction Settings
-
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.
-
Cursor Color: this is the color for the cursor cross lines.
-
Follow Mouse: the cursor will follow the mouse position when it’s over the map. If unchecked, you can change the cursor position on the map setting the cursorLocation property.
-
Allow User Drag: as the title says, when enabled user can drag around the map with Speed parameter. You can also enable Right Click Centers which means that the map will scroll and center on the position the user right-clicks. Contant Drag Speed disables dragging acceleration and Screen Edge Scroll means that the map would scroll if cursor reached the edges of the screen.
-
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).
-
Navigation Time: time in seconds for the fly to commands. Set it to zero to instant movements.
-
Enable Free Camera: this option is only enabled in Terrain mode. When checked, main camera is allowed to be moved/rotated as usual and WMSK will sync any transform change back and forth between the internal rendering camera and the main camera
Path Finding Settings
-
Heuristic: defines the formula used when estimating the distance to the destination. It affects to the shape of the route. Below are examples of different heuristics (used in demo scene 507 “Infinite Scroll”):
-
Default Max Cost: this setting defined the maximum allowed cost of the route, meaning 1 point per horizontal/vertical movement and 2.64 points per diagonals. Use a big number if you want to route across large areas of the world (default value is 200000) or reduce this value to increase performance and limit routes to nearer zones.
Custom Attributes Settings
In this section you can change default filenames for countries, provinces and cities custom attributes files.
These files are stored in Resources/WMSK/Geodata folder.
You can change these names to use different attribute sets.
Grid Settings
-
Show Grid: enables/disables hexagonal grid. When set for first time, the cells list and mesh is created and rendered according to the following settings.
-
Columns: number of columns in the grid.
-
Rows: number of rows in the grid. Usually this value will be the half of columns.
-
Color: the color of the hexagonal grid. You can use different alpha values for transparent grid.
-
Enable Highlight: if cells will be highlighted when mouse hovers them.
-
Highlight Color / Fade: speficies the color and fading effect to the currently highlighted cell.
-
Visible Distance (Min / Max): distance in world units from the Camera to the map where the grid is visible. Outside of this range, the grid will fade out gracefully until it gets invisible.
Miscellanea
-
Prewarm At Start: when enabled, the asset will perform some heavy computation during initialization to prevent hiccups during play. Some of these computations are the highlighting of big/complex countries (Russia, Antarctica, Canada, Greenland) and the navigation matrices of PathFinding engine.
-
Geodata Folder Prefix: in case you modify the geodata files provided with the asset (for example if you want to modify frontiers, add new countries or cities, etc.) then you will want to use a different folder for the modified files (so when the asset is updated you don’t need to backup/restore the geodata folder). In this case, you need to specify here the location of your geodata folder.
Choose Reset option from the gear icon to revert values to factory defaults.