Google. Maps. Loading. MapLoader
Script that attaches to a GameObject with a Camera component, and loads a region of the map visible to that camera.
Summary
Inheritance
Inherits from: MonoBehaviour
Public types |
|
---|---|
RegionShapeEnum{
|
enum Enum representing the possible shapes of map regions to load. |
Public attributes |
|
---|---|
Horizon = 10000
|
float
Maximum distance from the camera at which to load the map.
|
MapsService
|
The MapsService to be used to load the map.
|
RegionShape = RegionShapeEnum.Circle
|
Shape of region to load.
|
UnloadUnusedSeconds = 10
|
float
Only unload parts of the map that have been inactive for at least this long.
|
Zoom = 17
|
int
Zoom level at which to load the map.
|
Public functions |
|
---|---|
Init(GameObjectOptions loadingOptions)
|
void
Initializes the script with options to use when loading the map. This must be called before Load is called for the first time.
|
Load()
|
void
Loads the region of the map based on the camera's current position.
|
UnloadUnused()
|
void
Unloads parts of the map that have not been loaded or displayed in the last UnloadUnusedSeconds seconds.
|
Public types
RegionShapeEnum
RegionShapeEnum
Public attributes
Horizon
float Horizon = 10000
Maximum distance from the camera at which to load the map.
UnloadUnusedSeconds
float UnloadUnusedSeconds = 10
Only unload parts of the map that have been inactive for at least this long.
Zoom
int Zoom = 17
Zoom level at which to load the map.
Public functions
Init
void Init( GameObjectOptions loadingOptions )
Initializes the script with options to use when loading the map. This must be called before Load is called for the first time.
Details | |||
---|---|---|---|
Parameters |
|
Load
void Load()
Loads the region of the map based on the camera's current position.
UnloadUnused
void UnloadUnused()
Unloads parts of the map that have not been loaded or displayed in the last UnloadUnusedSeconds seconds.