Skip to content

Latest commit

 

History

History
81 lines (46 loc) · 3.33 KB

howto.md

File metadata and controls

81 lines (46 loc) · 3.33 KB

How to..

Table of content

Build your app using Unity3D

The simplest way is to explore demo app. It consists of the following parts:

  • platform depended native library (UtyMap.Shared). You need to compile it for each platform.
  • unity specific managed library (UtyMap.Unity). You may need to rebuild it with different platform specific compilation symbols if you plan to use it outside UnityEditor.
  • Some additional libraries used by UtyMap.Unity (UtyRx, UtyDepend). Just copy them to Plugin directory.
  • Demo app which demonstrates the simplest use cases.

Platform specific instruction can be found on "Build on .." pages.

Build your app without Unity3D

Native library has no dependency on Unity3D. You can use it inside other game engine or app framework.

Load map data for your region

utymap supports dynamic map data loading and it is used by default if there is no map data. Please note:

  • it requires internet connection
  • it loads data from OpenStreetMap or Mapzen based on level of details

If you want to import map data from file, check Import scene.

Tweak mapcss styles

All colors, sizes, etc. are defined in MapCss files and you can easily tweak any value here. Changes will be applied after application restart. Please note, if mesh caching is enabled then all data will be regenerated.

Customize POI

By default, only few POI are visualized: tree, barrier, lamps. Customization scene shows how to do it if you need more by rendering textured cube. Also you can change any of these cubes to your specific implementation, e.g. render cache machines or traffic lights.

Customize specific buildings

If you are not satisfied with OSM representation of some specific buildings or any other object, you can use your own 3D model instead or just remove object from scene. To achieve this, you should add specific rule in mapcss:

element|z16[id=777] {
// your declarations
}

where id is osm id. Customization scene provides an example which uses custom prefab instead of POI.

Render non-flat terrain using elevation data

You need to use Grid (recommended) or SRTM elevation provider. Check Elevation scene for working example.

Change zoom level dynamically from Globe to Ground level

Check Map scene. It provides some ideas how it can be implemented.

Fix crash happens all the time at specific location

This can be an issue inside core library related to polygon geometry processing, mapcss rules problems or something else. In such case, you can report exact location in glitter chat.

Get support

You may ask me using [gitter chat] (https://gitter.im/reinterpretcat/utymap).