Unity Plugin
Configurations
Overview
This package comes with a bunch of configuration assets that can be created and used in your project through the context menu in the Unity editor.
You can determine which configurations the package should use by dragging them into the persistent game object.
We provide an example map called "PaperMap" that uses shared configuration assets to function.
(Tip: You can/should review the content of those files to understand how all pieces come together to create the look of this map.)All configuration assets and their purpose
Tooltips
Each variable has a tooltip that explains its function
System (COALA) Config
Contains all the basic settings, such as:
API Key (paste here the Project Key of your project in the COALA Back-end)
Scale config object (Check here)
Building config object (Check here)
The material used for water shapes
Area loading
The number of Areas around the player that are loaded by the system (determined by distance in kilometers)
(Tip: use a higher value for "unload distance" to prevent loading and unloading of tiles when GPS stutters)
Meshes
Offsets for specific map elements
Server request behavior
Mesh generation behavior
UV generation behavior
Area Render Options
select which layers you wish to generate for your map
Scale Config
Initial Zoom Level
Determines the initial zoom level for your map (Check here)
This value is used for requesting data from the COALA server.
Valid values are from 14 to 16.
Coala Scale
This value determines the size of the map. The scale should be greater than 0.01. By default, it has the earth's size.
Use this for downscaling if you encounter shadow problems
You can set the value as a percentage as well (i.E.: 1=100%, 0.02=2%, 2=200%).
If you encounter strange mesh clipping problems, try increasing the main camera's "near clipping plane".
Elevation Scale
This value determines how much the elevation data affects the terrain on the map. A bigger value generates a more hillside look and a smaller value a more flat surface.
Building config
Contains all configurations related to buildings and their texturing
All building objects are attached to the area they are in
Buildings are basically generated by extruding their basic shape and they depend on the floor count
How buildings are rendered with the Advanced building texturing system
Create Building Meshes - Select which building parts to render. Choose from
Nothing
Everything
Floor
Walls
Roof
Basement
Create Building Colliders - Apply colliders to the chosen rendered building parts
Merge Building Meshes - Check this to have all buildings merge into one object (improves performance)
Spawn Closest to Player FIrst - Check this to render buildings closest to the player first
Number of Buildings Generate Per Frame - Control the number of buildings generated per frame
Coala Building Height Clamp To Level - Limit the maximum number of floors a building can have to this value
Default Building Level - The number of floors that will be applied to all buildings for which no floor data can be retrieved
Entrance Storey Height - The height of the ground floor mesh (in meters)
Middle Story Height - The height of all other floor meshes (in meters)
Roof Transition Storey Height - The height of the Roof transition mesh (in meters)
The rest of the Configurations in this config will be explained here
Parts
Buildings are split into three parts:
POI Config
This config takes care of which object should spawn on a POI's location.
Label - The POITag you defined in our back-end
Prefab - Object to spawn
for an advanced example visit Decoration
Cell Render Config
The most basic map element is the "Terrain". This config manages the conversion of the contexts you configured in the COALA back-end to terrain data.
Default (this render rule is used if none of the "custom" ones apply)
Custom
Name - select here the ProjectTag you created in our back-end
Material - It often makes sense to "mark" the cell if a specific content is triggered
Only if Gametag (ProjectTag) Is Strongest - Checking this box activates the rule only if the respective ProjectTag has the highest "Weight" in the back-end
Street Render Config
Another data layer is the streets, a giant line-based network. The render system needs to know how to draw each street type.
This config is divided into two sections:
Default (this render rule is used if none of the "custom" ones apply)
Custom
Categories - A list of street types
Width - The width of the street
Materials - The materials used by this street
Shadow Casting Mode - How the street should handle shadows
Mesh Generator (only for bridges) - How the mesh is generated (see Bridges)
Zones Config
To display Zones on the map you can set up a zone config object
Place Border Prefab Mode - The pattern according to which the zone border prefabs should be spawned
Border Prefabs - The prefabs that should be used for the zone borders
Align border with terrain - Check this to adjust the border meshes in a way that aligns with the terrain (see here for more info)
Weather Config
Normally there is a player or a reference point on the map. The area that this point is in is used to draw the real-world weather data. This config lets you define which weather particle system is spawned when the weather of the area changes.
To manipulate this feature, define how many weather types you want your project to react to.
(Tip: Predefined weather particle effects for "Rain", "Fog" and "Snow" are located in the package at "Packages->COALA->Runtime->Resources->Particles".)
The weather effect is attached to the player/reference point and reacts to movement.
Weather_name - The name of the weather of the respective list
Weather_particle - The prefab/particle system that will spawn
Update Config
Define at which frequency the areas are reloaded/updated as a reaction to possible changes in context/ProjectTags depending on time and weather.
Update Time in Sec - The update time in seconds
Update What - What will be updated for that specific area
Valid entries are GAMETAGS/CONTEXTS, POIS, WEATHER or a combination of the above
Crime Config
Define how crime data should be displayed
For more information on the crime config settings, visit the Crime Page