Maps Unity SDK API Reference

The Maps Unity SDK is a Unity plugin for creating mobile (Android, iOS) location-based games, via access to Google Maps data from within the Unity game engine.

Google.Maps

Classes

CacheOptions Encapsulates map data caching parameters.
CountryProvider The superclass of scripts that determine the user's country.
GameObjectOptions Encapsulates styling options for map feature GameObjects.
GameObjectStyle Style used to create a GameObject.
GameObjectStyle.GameObjectStyleBuilder Builder for GameObjectStyle instances.
MapLoadRegion Encapsulates a region of the map to load.
MapPreviewOptions Options for edit-time map preview.
MapsService The MapsService class serves as the entry point for interacting with the Maps Unity SDK.
MetadataOptions Options controlling the addition of metadata to game objects generated by Musk.
PlayableLocationsService The entry point for using Playable Locations.
PlayableLocationsService.ReportBadPointStatus Encapsulates the status of the completed request for submitting a bad place report.
TerrainOptions Encapsulates terrain parameters.

Google.Maps.Collections.Generic

Google.Maps.Coord

Classes

Projection Projection between latitude/longitude and Unity worldspace.

Structs

LatLng An immutable representation of a set of geographical coordinates.
MercatorTileCoords An immutable representation of the x,y coordinates of a Google Maps tile.

Google.Maps.Event

Classes

AlphaMapsNeedPaintArgs Event arguments for AlphaMapsNeedPaint events.
AlphaMapsNeedPaintEvent Encapsulates a AlphaMapsNeedPaint event.
AreaWaterEvents Encapsulates Feature.AreaWater construction pipeline events.
DidCreateAreaWaterArgs Event arguments for Feature.AreaWaterAreaWaterEvents.DidCreate events.
DidCreateAreaWaterEvent Encapsulates a Feature.AreaWater DidCreate event.
DidCreateEventArgs< TM, TS > The base class for DidCreate event arguments.
DidCreateExtrudedStructureArgs Event arguments for Feature.ExtrudedStructureExtrudedStructureEvents.DidCreate events.
DidCreateExtrudedStructureEvent Encapsulates a Feature.ExtrudedStructure DidCreate event.
DidCreateIntersectionArgs Encapsulates event arguments for Feature.SegmentSegmentEvents.WillCreate events.
DidCreateIntersectionEvent Encapsulates an Intersection DidCreate event.
DidCreateLineWaterArgs Event arguments for Feature.LineWaterLineWaterEvents.DidCreate events.
DidCreateLineWaterEvent Encapsulates a Feature.LineWater DidCreate event.
DidCreateModeledStructureArgs Event arguments for Feature.ModeledStructureModeledStructureEvents.DidCreate events.
DidCreateModeledStructureEvent Encapsulates a Feature.ModeledStructure DidCreate event.
DidCreateRegionArgs Event arguments for Feature.RegionRegionEvents.DidCreate events.
DidCreateRegionEvent Encapsulates a Feature.Region DidCreate event.
DidCreateSegmentArgs Event arguments for Feature.SegmentSegmentEvents.DidCreate events.
DidCreateSegmentEvent Encapsulates a Feature.Segment DidCreate event.
DidCreateTerrainArgs Event arguments for Terrain DidCreate events.
DidCreateTerrainEvent Encapsulates a Terrain DidCreate event.
DidModifyRoadLatticeArgs Encapsulates event arguments for DidModifyRoadLatticeEvent.
DidModifyRoadLatticeEvent Encapsulates a DidModifyRoadLattice event.
DidPaintTerrainArgs Event arguments for Terrain DidPaint events.
DidPaintTerrainEvent Encapsulates a Terrain DidPaint event.
ErrorArgs The base class for error arguments.
Events Encapsulates the set of all events fired by the SDK.
ExtrudedStructureEvents Encapsulates Feature.ExtrudedStructure construction pipeline events.
FeatureMaskPreRenderArgs Event arguments for FeatureMaskPreRender events.
FeatureMaskPreRenderEvent Encapsulates a FeatureMaskPreRender event.
FloatingOriginEvents A container for events relating to MapFeatures.
FloatingOriginMoveArgs Event arguments for FloatingOriginMoveEvent events.
FloatingOriginMoveEvent
IntersectionEvents Encapsulates Intersection construction pipeline events.
LineWaterEvents Encapsulates Feature.LineWater construction pipeline events.
ListenerCountingUnityEvent< T > A subclass of UnityEvent that keeps track of the number of runtime-added event listeners.
MapEvents Encapsulates the set of events related to fetching and loading the map.
MapLoadedEvent Encapsulates a map loaded event (MapEvents.Loaded).
MapLoadErrorArgs Encapsulates the set of arguments for MapEvents.LoadError.
MapLoadErrorEvent Encapsulates a map load error event (MapEvents.LoadError).
MapLoadProgressArgs Arguments for MapEvents.Progress.
MapLoadProgressEvent Encapsulates a map part loaded event (MapEvents.Progress).
MapLoadStartEvent Encapsulates a map load start event (MapEvents.LoadStart).
ModeledStructureEvents Encapsulates a collection of Feature.ModeledStructure construction pipeline events.
RegionEvents Encapsulates a collection of Feature.Region construction pipeline events.
RoadLatticeEvents Encapsulates a collection of RoadLattice events.
SegmentEvents Encapsulates a collection of Feature.Segment construction pipeline events.
TerrainEvents Encapsulates a collection of Terrain construction pipeline events.
WillCreateAreaWaterArgs Encapsulates event arguments for Feature.AreaWater WillCreate events.
WillCreateAreaWaterEvent Encapsulates a Feature.AreaWater WillCreate event.
WillCreateEventArgs< TM, TS > The base class for WillCreate event arguments.
WillCreateExtrudedStructureArgs Encapsulates event arguments for Feature.ExtrudedStructure `WillCreate events.
WillCreateExtrudedStructureEvent Encapsulates a Feature.ExtrudedStructure WillCreate event.
WillCreateFeatureMaskTextureArgs Event arguments for WillCreateFeatureMaskTexture events.
WillCreateFeatureMaskTextureEvent Encapsulates a WillCreateFeatureMaskTexture event.
WillCreateIntersectionArgs Encapsulates event arguments for IntersectionFeature WillCreate events.
WillCreateIntersectionEvent Encapsulates an Intersection WillCreate event.
WillCreateLineWaterArgs Encapsulates event arguments for Feature.LineWater WillCreate events.
WillCreateLineWaterEvent Encapsulates a Feature.LineWater WillCreate event.
WillCreateModeledStructureArgs Encapsulates event arguments for Feature.ModeledStructure WillCreate events.
WillCreateModeledStructureEvent Encapsulates a Feature.ModeledStructure WillCreate event.
WillCreateRegionArgs Encapsulates event arguments for Feature.Region WillCreate events.
WillCreateRegionEvent Encapsulates a Feature.Region WillCreate event.
WillCreateSegmentArgs Encapsulates event arguments for Feature.Segment WillCreate events.
WillCreateSegmentEvent Encapsulates a Feature.Segment WillCreate event.
WillCreateTerrainArgs Event arguments for Terrain DidCreate events.
WillCreateTerrainEvent Encapsulates a Terrain WillCreate event.

Structs

MapLoadedArgs Encapsulates arguments for MapEvents.Loaded.
MapLoadStartArgs Encapsulates arguments for MapEvents.LoadStart.

Google.Maps.Exception

Classes

FloatingOriginNotSetException Thrown when you use Projection prior to setting the origin.
MapsException The base class for Google.Maps exceptions.
MapsServiceNotInitializedException Exception thrown when attempting to use an un-initialized MapsService.
ShaderNotFoundException The exception that is thrown when a shader could not be found.
TileParsingException Thrown when a tile from the network can't be parsed.

Google.Maps.Feature

Classes

AreaWater A MapFeature that represents a 2D body of water. For example, a lake.
ExtrudedStructure A MapFeature that represents an extruded structure.
IntersectionMetadata Unity-independent representation of immutable properties of an intersection feature.
LineWater A MapFeature that represents a line-like water feature. For example, a river.
MapFeature Mutable data associated with a map feature.
MapFeatureMetadata A Unity-independent representation of immutable properties of a geographical feature.
ModeledStructure A MapFeature that represents a modeled structure. For example, a building with detailed vertex/triangle data.
Region A MapFeature that represents a 2D region. For example, a park.
RegionMetadata A Unity-independent representation of immutable properties of a land region.
Segment A MapFeature that represents a 2D path. For example, a road.
SegmentMetadata A Unity-independent representation of immutable properties of a 2D path. For example, of a road.
StructureMetadata A Unity-independent representation of immutable properties of a structure. For example, of an extruded or modeled building.
WaterMetadata Unity-independent representation of immutable properties of water feature.

Google.Maps.Feature.Shape

Classes

Area A geometric representation of a flat MapFeature. For example, a park.
Area.EdgeSequence Represents a contiguous sequence of edges. Each vertex appears only once, unless this represents a closed loop (in which case the first and last verticies are identical). A sequence of n vertices represents n - 1 contiguous edges: [v0, v1], [v1, v2], ..., [v(n - 2), v(n - 1)].
ExtrudedArea A geometric representation of a MapFeature made up of a collection of extrusions.
ExtrudedArea.Extrusion A footprint together with base and top heights.
Line A geometric representation of a 2D path on a map.
LineGroup Represents a collection of Shape.Lines used to represent a 2D path on a map, such as a road, train line or ferry route.
MapFeatureShape Describes the geometric information for a Feature (such as a building or road).
ModeledVolume A geometric representation of a 3D volume constructed by explicitly specifying geometry data.

Google.Maps.Feature.Stitching

Google.Maps.Feature.Style

Classes

AreaWaterStyle Encapsulates immutable styling information used to control how GameObjects are generated from Feature.AreaWaters.
AreaWaterStyle.Builder AreaWaterStyle builder.
ExtrudedStructureStyle Encapsulates immutable styling information used to control how GameObjects are generated from ExtrudedStructures.
ExtrudedStructureStyle.Builder The ExtrudedStructureStyle builder.
LineWaterStyle Encapsulates immutable styling information used to control how GameObjects are generated from LineWaters.
LineWaterStyle.Builder The LineWaterStyle builder.
ModeledStructureStyle Encapsulates immutable styling information used to control how GameObjects are generated from ModeledStructures.
ModeledStructureStyle.Builder The ModeledStructureStyle builder.
RegionishStyle Encapsulates immutable styling information used to control how GameObjects are generated from Area related feature types such as Region and AreaWater.
RegionishStyle.RegionishStyleBuilder RegionishStyle builder.
RegionStyle Encapsulates immutable styling information used to control how GameObjects are generated from Regions.
RegionStyle.Builder The RegionStyle builder.
SegmentishStyle Encapsulates immutable styling information that is used to control the way that GameObjects are generated from line-related feature types—such as Segment and LineWater.
SegmentishStyle.SegmentishStyleBuilder The SegmentishStyle builder.
SegmentStyle Encapsulates immutable styling information used to control how GameObjects are generated from Segments.
SegmentStyle.Builder The SegmentStyle builder.

Interfaces

IStyle Immutable styling information used to control how GameObject are generated from MapFeatures.

Google.Maps.Feature.Style.Attachment

Classes

StyleAttachment Attaches styling settings to any MapsService components residing on the same GameObject.

Google.Maps.Feature.Style.Settings

Classes

AbstractStyleSettings Abstract base class for style settings scriptable objects.
AreaWaterStyleSettings Style settings scriptable object for area water styles.
ExtrudedStructureStyleSettings Scriptable object for extruded structure settings.
LineWaterStyleSettings Scriptable object for segment style settings.
ModeledStructureStyleSettings Scriptable object for modeled structure settings.
RegionStyleSettings Style settings scriptable object for area water styles.
SegmentStyleSettings Scriptable object for segment style settings.
SettingsChangeListener Listens for changes to an AbstractStyleSettings instance.

Google.Maps.Loading

Classes

MapLoader Script that attaches to a GameObject with a Camera component, and loads a region of the map visible to that camera.
MixedZoom Extra parameters for a MapLoader to load the map at lower zoom levels further from the camera.

Google.Maps.Logging

Google.Maps.Terrain

Classes

TerrainStyle Encapsulates immutable styling information used to control the appearance of generated Terrain.
TerrainStyle.Builder The TerrainStyle builder.

Google.Maps.TileLoading

Interfaces

ICountryProvider Interface for classes that provide the user's country.

Google.Maps.Unity

Classes

AreaWaterComponent Encapsulates metadata associated with a GameObject constructed from an Feature.AreaWater.
ExtrudedStructureComponent Encapsulates metadata associated with a GameObject constructed from an Feature.ExtrudedStructure.
GameObjectManager The GameObject manager, which tracks destroyed GameObjects.
HotLoadableMonoBehaviour MonoBehaviour designed to be hot loaded.
LineWaterComponent Encapsulates metadata associated with a GameObject constructed from a Feature.LineWater.
MapFeatureComponent Encapsulates metadata associated with a GameObject constructed from a Feature.MapFeature.
MetadataRegister A register for associating metadata objects with GameObjects.
MetadataRegisterCore< T > Associate metadata objects with target objects.
ModeledStructureComponent Metadata associated with a GameObject constructed from a Feature.ModeledStructure.
RegionComponent Encapsulates metadata associated with a GameObject constructed from a Feature.Region.
SegmentComponent Encapsulates metadata associated with a GameObject constructed from a Feature.Segment.

Interfaces

IMapFeatureComponent< FT > Component storing information about the map feature used to create a game object.

Google.Maps.Unity.Attribution

Classes

Attributions Aggregates attributions of multiple IAttribution.
AttributionStyle Styling options for the attribution text. If an instance of this component does not exist in the scene, default settings are used instead.

Google.Maps.Unity.Intersections

Classes

Intersection A representation of a road intersection that can have multiple in/outgoing roads.
IntersectionArm Represents an outgoing/incoming road from an intersection.
IntersectionFeature A map feature representing an intersection overlay object.
RoadLattice A representation of a graph of nodes and connections representing the road network in an area. For example, a single map tile, or a loaded map region.
RoadLattice.LineSegment2D Encapsulates an immutable, directed line segment that represents a connection between nodes in this lattice.
RoadLattice.NoNodesFoundException Exception thrown by RoadLattice.SnapToNode when no nodes can be found. For example, when the lattice is currently empty.
RoadLattice.NoPathException Exception thrown by RoadLattice.FindPath when a path cannot be found.
RoadLattice.PathOptions Additional options provided to RoadLattice.FindPath and RoadLattice.UncheckedFindPath.
RoadLatticeEdge A structure representing an outbound connection to a RoadLatticeNode. The source of the edge is not explicitly represented, only the destination.
RoadLatticeNode A node in a graph representing the layout of roads in an area. Each node contains a collection of neighbor nodes.

Google.Maps.Unity.Metadata

Classes

GameObjectMetadata< T > Metadata for a game object created from a map feature.

Interfaces

IGameObjectMetadata Metadata for a game object created from a map feature.
IMetadata Metadata that can be added to an object using MetadataRegister.

Google.Maps.Util

Classes

UnityEditorProxyStub Stub class to throw exceptions if UnityEditor functions are called in non-editor mode.

Interfaces

IUnityEditorProxy A proxy for UnityEditor functions. This allows us to skip a level of dependency.

Google.Maps.Util.Geometry

Google.Maps.Util.Material

Classes

BaseMapMaterialUtils Utility methods for constructing UnityEngine.Material instances compatible with base map features.