Google.Maps Encapsulates map data caching parameters. The base directory used for storing cache files. If this string value is empty, then `BasePath` defaults to . The directory under `BasePath` used for storing cache files. Note: Files in this directory can be deleted on cache cleanup. Do not put other files in this directory. The maximum amount of space (in bytes) to allocate for cache files. The total can exceed this value temporarily—in between cache cleanup passes. Set this value to to *0* to use an unlimited amount of space. This maximum is applied independently to two different caches - map features (the Features directory) and terrain (the Terrain directory). If terrain is enabled then the actual maximum disk space used is double this value. Note: If you are targeting WebGL (which is not officially supported), then set this value to *0*. Maximum time to wait to read from the disk cache. If a read takes longer than this, the disk cache is disabled. Set this value to 0 to wait indefinitely. This is a workaround for a known bug that causes Musk to hang waiting for the disk cache. When behaving correctly, reading from the disk cache should be fast. Creates a shallow copy of this object. A disjoint set is a data structure that maintains a partitioning of a set into disjoint subsets (see https://en.wikipedia.org/wiki/Disjoint-set_data_structure). This implementation maintains a Pool of sets with the following operations: - Determine if an element is contained in any maintained subset (ContainsElement); - Return the set containing the supplied element (GetSetContaining); - Combine the sets containing two supplied elements (SubsetUnion) -- implicitly creating new single element subset(s) for either element if not currently in a subset; - Return a set containing all the subsets in the Pool (GetSets). NOTE: This class is designed for simplicity and readability and would not be efficient for intensive use with subsets containing hundreds+ elements as a certain amount of copying occurs during set combination, it is however fine for large collections of relatively small sets. Creates a new, empty DisjointSet. Returns whether the supplied element is present in a subset of this DisjointSet. The element to check. Whether the supplied element is present. Returns the set associated with the supplied element. The element for which to return the associated set. The set associated with the supplied element. If the supplied element is not associated with a set. Adds a new element to this DisjointSet if it is not currently present. The element to add if not already present. Combines the subsets associated with the two supplied elements. If either element is not currently in this DisjointSet, a single element subset containing that element is created before performing the combination. The first element. The second element. Returns a representative element from the supplied set. A representative element is an arbitrary element contained in the set. This is useful for selecting a key with which to identify this set in the pool of subsets in this DisjointSet structure (valid because all subsets are disjoint, so the representative element cannot also be present in any other subset). The set of values from which to draw a representative. A representative element from the values set. If the set is empty. Returns a representative element from the set associated with the supplied element. See for an explanation of "representative element". This is not a stable representative, changing the set associated with the supplied element may change the representative returned by this function. The element from whose associated subset the returned representative is selected. A representative element from the subset associated with element. If the element is not associated with any set. Returns a set of the subsets currently contained in this DisjointSet. Returns a newly allocated outer HashSet, but the elements within that set are the actual subsets stored internally, so these should treated as readonly. The set of subsets. Returns a string displaying contained subsets separated by commas. Returns a string representing the supplied set in the form "{value1, value2}". The set from which to generate a string representation. A Dictionary with similar characteristics to , with the exception that key/value pairs are enumerated in insertion order. Performance characteristics are as follows: Insertion:O(1) Removal:O(1) Lookup (by key):O(1) Enumeration (per item):O(1) The type of the keys in the dictionary. The type of the values in the dictionary. Stores dictionary elements in insertion order. Stores a mapping from each key to the representing its insertion order in . This allows for O(1) lookup and removal of dictionary elements. Gets a collection containing the keys in , in insertion order. Each key in the returned collection is a reference to the actual key in the dictionary. Therefore, changes to the keys in the collection will result in changes to the keys in the dictionary. Gets a collection containing the values in , in insertion order. Each value in the returned collection is a reference to the actual value in the dictionary. Therefore, changes to the values in the collection will result in changes to the values in the dictionary. Constructor. Returns an Enumerator that iterates through the , in the order in which elements were added. For the purposes of enumeration, each item is a representing each key/value pair in the dictionary. Adds the specified key to the dictionary. The key of the element to add. The value of the element to add. The value can be null for reference types. If the specified key is null. If an item has already been added with the specified key. Copies the elements of the to an array of type starting at the specified array index. Elements are copied by insertion order. The destination array for elements copied from the The zero-based index within the array at which copying begins. If array is null. If arrayIndex is not a valid index within array. The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array. Quadtree interface. The type of the keys in the quadtree. The type of the values in the quadtree. Add the given key and value to the quadtree. The key of the item to add. The value of the item to add. Remove an item with the given key from the quadtree. The key to search for. True if a value was removed. Returns true if the given key exists in the quadtree. The key to check. True if the given key exists in the quadtree. Returns true if an item in the quadtree exists inside the given rectangle. The rectangle to test. True if an item in the quadtree exists inside the given rectangle. Adds items that the given rectangle overlaps in the quadtree to the given collection. The rectangle to test. The collection to add to. The maximum number of items to add to . The number of items added to . Clears the quadtree. Compares a by key only. Compares two by key. The left-hand pair to compare. The right-hand pair to compare. An integer that is negative if is less than , positive if it is greater, and zero if they are equal. Push a new element onto the heap. Key for new element. New element to push. A simple binary min heap. The type stored in the heap. Default heap capacity if none is specified. The number of elements in the heap. The total capacity of the heap. Cannot be set to less than the current Count. Thrown when trying to set negative capacity. The backing to use when ordering elements. The to use when ordering elements. Thrown when no is provided and is not available. Constructs an empty heap with and optional . Comparer to use to determine minimum element, or if not provided. Construct an empty heap with given and optional . Initial capacity of heap. Comparer to use to determine minimum element, or if not provided. Construct a heap from the given and optional . The heap capacity is initially sized to the input exactly. Elements to be put in heap. Comparer to use to determine minimum element, or if not provided. Get the index of the left child of by heap indexing. Element to get left child of. Index of the left child of . Get the index of the right child of by heap indexing. Element to get right child of. Index of the right child of . Get the index of the parent of by heap indexing. Element to get the parent of. Index of the parent of . Restore the heap, assuming only the last element may violate the heap property. Restore the heap, assuming only the root element may violate the heap property. If is given, restoration is performed only on the heap rooted at . Root of heap subtree to heapify. Convert backing array into a heap regardless of current ordering. Push a new element onto the heap. Item to push. Peek at the minimum element of the heap. The minimum element in the heap. Thrown when heap is empty. Pop the minimum element off the top of the heap and return it. The minimum element in the heap before it was removed. Thrown when heap is empty. Remove all elements from the heap. The capacity remains unchanged. A simple, rect-based quadtree. When a quadrant in the quadtree is full, it attempts to subdivide if its maximum depth has not yet been reached. If the quadrant cannot be subdivided, then items will be added beyond its maximum capacity. Stores data relating to quadrant in this quadtree. Whether this node is a leaf. The bounds of this quadrant. The index of the first child of this node (if it is not a leaf). The items stored in this node. This list is lazily initialized. Backing field for . Leaf node constructor. An item in the quadtree. The bounds of the item. The value of the item. Constructor. The initial capacity of . The number of items in this quadtree. The default value for . The maximum number of items a single quadrant can hold before subdividing. This limit does not apply for quadrants at max depth. The maximum depth of this quadtree. Collection reused in to reduce garbage. The number of nodes in this quadtree. The nodes in this quadtree. The node at index 0 is the root node. Constructor. The bounds of the quadtree. The maximum number of items a single quadrant can hold before subdividing. This limit does not apply for quadrants at max depth. The maximum depth of the quadtree. Constructor. The bounds of the quadtree. Constructor. Thrown when exists outside the bounds of the quadtree. Non-point based entries may be recorded multiple times. If this is undesirable behaviour, use a set collection such as . Thrown when exists outside the bounds of the quadtree. Clears the quadtree and resets its bounds. The new bounds of the quadtree. Thrown when exists outside the bounds of the quadtree. Initializes the quadtree. The bounds of the quadtree. Subdivides the node at the given index. The index of the node to subdivide. An AVL tree, which maintains a balanced binary search tree. The type of objects to insert into the tree. The node class used by the AVL tree. It must keep a reference to the tree that created it for a sanity check when it is passed to the tree's removal method to ensure it belongs to that tree. The tree that holds this node. The value the node holds. The node that is a parent of this node. If this is null, this node is the root node. The left child node of this node. The right child node of this node. The height of the subtree rooted at this node. Constructor. The value the node will hold. The tree this node belongs to. The parent node of this node. The comparer to use when traversing the trees. The root node of the tree. Constructor. Uses the given comparer for T. The comparer to use when traversing the tree. Default constructor. Uses the default comparer for T. Returns the difference in height between a node's two subtrees. A positive return value indicates that the right subtree is taller. The node to check. The difference between a node's two subtrees. Tries to removes the given node from the tree. The node to remove. True if the node was removed from the tree. Removes the given node from the tree. The node to remove. Replaces a node by a given node or null. Nodes are replaced rather than simply having their values swapped so that any nodes held from the outside do not become invalid. The node to replace. The node to replace it with. Rebalances the tree after a remove or add operation. The parent of the node that was removed or added. Sets the height of the node to be the height of its largest subtree plus one. The node to update the height of. Performs left or right rotations to remove imbalance on the given node. The node to restructure. The node's tallest child. The child's tallest child. The root node of the rebalanced subtree. Performs a left rotation. The node to rotate left. Performs a right rotation. The node to rotate right. Finds a node with the given value in the tree. The value to find a node with. The node holding the given value, or null if it doesn't exist. Returns the tallest child of the given node. The node to return the tallest child of. The tallest child of the given node. Creates a new node in the tree and returns it. The value the new node will hold. The parent of the new node. The newly created node. Defines the interface of a binary tree. The type of the values that the tree's nodes hold. The root node of the tree. The number of nodes in the tree. Adds a node to the tree holding a given value. The value the new node will hold. The node that was added to the binary tree that holds the given value. Returns true if the given value exists in the tree. The value to check. True if the value exists in the tree. Removes a node holding the given value from the tree, if it exists. The value to remove. True if a node holding the given value was found and removed from the tree. Removes the given node from the tree, if it exists in the tree. The node to remove. True if the given node was found in and removed from the tree. Returns the node holding the minimum value in the tree. If the tree is empty, this returns null. The node holding the minimum value in the tree. Returns the node holding the maximum value in the tree. If the tree is empty, this returns null. The node holding the maximum value in the tree. Returns the node holding the smallest value greater than but not equal to the given value. If no such node exists, null is returned. The value to test against. The node holding the smallest value greater than but not equal to the given value. Returns the node holding the largest value less than but not equal to the given value. If no such node exists, null is returned. The value to test against. The node holding the smallest value greater than but not equal to the given value. Defines the read-only interface of a binary tree node. The type of the value the node holds. The value the node holds. The node that is a parent of this node. If this is null, this node is the root node. The left child node of this node. The right child node of this node. Returns the successor node of this node. The successor node is the node that would come immediately after this node in an in-order traversal. If no such node exists, null is returned. The successor node of this node. Returns the predecessor node of this node. The predecessor node is the node that would come immediately before this node in an in-order traversal. If no such node exists, null is returned. The predecessor node of this node. Projection between latitude/longitude and Unity worldspace. Caution: You must set the floating origin before using the Coordinate System. For more information, see the method. The zoom level. Whether has been set. A backing field for . Floating origin, stored as a Vector2D point in Earth-scale Mercator space. When converting to/from %Unity Worldspace, Vector3 values are translated relative to this point (in order to avoid single precision floating point number stability issues). A backing field for . Mercator scale factor. When converting to/from Unity Worldspace, Vector3 values are scaled relative to this value. The ideal Unity Worldspace scale is 1:1 (1 unit = 1 meter), however in the Mercator Projection, scale varies by latitude (1 at the equator, 2 at 60 degrees and infinity at the north pole). Instead of attempting to rescale the world as users move north/south, The SDK locks the scale to the initial origin's latitude. This means that the world slowly changes size as users move north/south, however in location-based games users are not expected to move far enough or fast enough for this to be noticeable. Constructor. Zoom. Establishes the initial floating origin and Mercator scale of the coordinate system. Initial coordinate system floating origin value. If the floating origin has already been set. Moves the floating origin (used when converting values to/from ). The floating origin should be moved whenever the user moves far enough that floating point stability issues become a concern (the density of representable floating point numbers decreases as their magnitude increases). After calling this method, you should use the returned offset value () to translate all s in the scene (ie. to reposition them closer to the new floating origin and hence reduce the magnitude of their floating point values). New floating origin value. A offset for manually translating s to reposition them relative to the new floating origin. Converts a `LatLng` value into a %Unity Worldspace `Vector3` by way of the Spherical Mercator projection: - translated relative to the current origin (). - scaled relative to the latitude of the initial floating origin (). The LatLng value to convert. A Vector3 value in %Unity Worldspace. Converts a %Unity Worldspace `Vector3` into a `LatLng`, by way of the Spherical Mercator projection. This method is the inverse of the method. It takes into account the fact that the Vector3 has been translated relative to the current origin, and scaled relative to the latitude of the initial origin. The `Vector3` value to convert. The converted `LatLng` value. The radius of the Earth, in meters, according to the spherical Earth model used by Google Maps (itself based on the major equatorial radius of the WGS 84 ellipsoid). The circumference of the Earth, in meters. Earth-scale Spherical Mercator Projection. Scaled so that at the equator, the distance spanned by a full 360 degrees of longitude is equal to the circumference of the Earth (in meters). Size of Earth-scale Mercator Projection space along the x axis. For square projections (ie. with truncated latitude), this also applies to the y axis. Minimum X value in Earth-scale Mercator space. For square projections (ie. with truncated latitude), this also corresponds to the minimum Y value. Maximum X value in Earth-scale Mercator space. For square projections (ie. with truncated latitude), this also corresponds to the maximum Y value. Minimum Y value in Earth-scale Mercator space. Maximum Y value in Earth-scale Mercator space. Projects a LatLng value into Mercator space, scaled to the size of the Earth (in meters). The LatLng value to project. The projected value, in Earth-scale Mercator space. Reverses a Mercator projection back into LatLng space. Inverse of . The Mercator projection value. The LatLng value. An immutable representation of a set of geographical coordinates. The minimum latitude value (i.e., the South Pole). The maximum latitude value (i.e., the North Pole). The minimum longitude value (i.e., the Antimeridian). The maximum longitude value (i.e., the Antimeridian). The latitude value. Valid values are in the range: [-90, 90]. Values outside this range are clamped (rounded). For example, the value 100 would become 90, and the value -100 would become -90. Serializable Latitude field exposed to the Unity inspector. Its value can be accessed programmatically through . The longitude value. Valid values are in the closed interval: [-180, 180]. Values outside this range are wrapped. For example, the value -190 would become 170, and the value 190 would become -170. This is because longitudes wrap around the globe. Both -180 and 180 are allowed (they both correspond to the Antimeridian). Serializable Latitude field exposed to the Unity inspector. Its value can be accessed programmatically through . Epsilon value for equality testing (when comparing individual Lat or Lng double values). The `%LatLng` constructor. Constrains and within the appropriate bounds. is clamped to [-90, 90], and is wrapped to [-180, 180]. Returns the formatted string representation of this `%LatLng`. Implements the interface. A `LatLng` object to compare with this one. Indicates whether the specified `LatLng` is equal to this `LatLng`. Overrides the `%Equals()` method. Overrides the `%GetHashCode()` method. Implementation of the Spherical Mercator Projection, also known as the "Web Mercator" projection (see https://en.wikipedia.org/wiki/Web_Mercator). Mercator space is finite in width (x) but infinite in height (y). "x" corresponds to longitude (in radians), while "y" is a function of latitude and spans an infinite range. As "y" gets larger, points get closer to the north pole but never quite reach it. The north and south poles have infinite "y" values. Minimum X value in Mercator space. Maximum X value in Mercator space. Minimum Y value in Mercator space. Maximum Y value in Mercator space. Projects a LatLng value into Mercator space. The LatLng value to project. The projected value, in Mercator space. Reverses a Mercator projection back into LatLng space. Inverse of . The Mercator projection value. The LatLng value. An immutable representation of the x,y coordinates of a %Google %Maps tile. For more information, see Map and Tile Coordinates. The x coordinate. This value is returned by the `MaxValue()` method. The X coordinates wrap. For more information, see Map and Tile Coordinates. The y coordinate. The Y coordinates are clamped. For more information, see Map and Tile Coordinates. The zoom level. The `%TileCoord` constructor. The x coordinate. The y coordinate. The zoom level. If this parameter is true, then the x coordinate is wrapped, and the y coordinate is clamped to the extent of the tile coordinate space at this zoom level. Maximum allowed tile coord value (same for both x and y). Zoom Max value. Minimum allowed tile coord value (same for both x and y). Zoom Min value. Size of TileCoord space along the x and y axes. Zoom TileCoord extent. Size of a tile at the equator, in meters (same along the x and y axes). Zoom Tile size. Calculates all child tiles of tileCoord by subdividing it into four corresponding s of the next incrementing zoom level. Note: One of zoom level i is comprised of four s of zoom level (i+1). The relationship between tileCoord and its child tiles: Before subdivision: ----------------- | | | | | | | x, y | | | | | | | ----------------- After subdividing into its child tiles: -------- -------- | | | | 2x, | 2x + 1,| | 2y | 2y | -------- -------- | | | | 2x, | 2x + 1,| | 2y + 1 | 2y + 1 | -------- -------- Tile Coordinates. List of tileCoord's child tiles. Returns whether this tile is an ancestor of another. A tile is trivially considered to be an ancestor of itself. Descendant tile coord. Returns this tile's ancestor at the specified zoom level. Zoom level of the ancestor. Must be less than or equal to . Returns this tile's parent. Produces the to the immediate west of this tile coordinate. Returns true if the coordinate to the west falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not. This parameter is filled with the tile coordinate to the immediate west of this one. Whether the returned coordinate should be normalized. Produces the to the immediate east of this tile coordinate. Returns true if the coordinate to the east falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not. This parameter is filled with the tile coordinate to the immediate east of this one. Whether the returned coordinate should be normalized. Produces the to the immediate north of this tile coordinate. Returns true if the coordinate to the north falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not. This parameter is filled with the tile coordinate to the immediate north of this one. Whether the returned coordinate should be normalized. Produces the to the immediate south of this tile coordinate. Returns true if the coordinate to the south falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not. This parameter is filled with the tile coordinate to the immediate south of this one. Whether the returned coordinate should be normalized. Produces the offset from this tile coordinate by the specified X and Y. Returns true if this coordinate falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not. This parameter is filled with the tile coordinate whose position relative to this one is specified by xOffset and yOffset. The number of tiles to move to the east (negative for west, zero to stay in place). The number of tiles to move to the south (negative for north, zero to stay in place). Whether the returned coordinate should be normalized. Generates an array of coordinates for the tiles surrounding the supplied tile, accounting for boundaries, without wrapping. If true, neighbours on the other side of the anti-meridian will be included, otherwise only tiles on the same edge of the map will be returned. The coordinates of neighboring tiles Returns the formatted string representation of this `%TileCoord`. Implements the interface. The other `%TileCoord` to compare with this one. A boolean value that indicates whether the specified `%TileCoord` and this one are equal. Overrides the `%Equals()` method. The other object to compare with this `%TileCoord`. Overrides the `%GetHashCode()` method. Static utility class for working with Tile-local Coordinates. Tile-local coordinates are used by map tiles when encoding vertex geometry. Size of TileLocalCoord space along the x and y axes. The scaling factor used to convert raw building heights to tile-local coords. Does not use VertexResolution as building heights are always in 1/16ths of a pixel. Immutable struct representing double-based (x,y) coordinates. Equivalent to Unity's Vector2 struct (albeit much less full-featured), for situations where single-precision floating point arithmetic is insufficient (typically used for representing points in Earth-scale Mercator space, ). The "D" stands for "double". The X value. The Y value. Constructor. X value. Y value. Implements the interface. The other object to compare against. Whether the objects are equal. The zero vector. Calculates the dot product between two vectors. A vector. Another vector. Result of the dot product between the input vectors. Normalize a vector. If the magnitude is too small the zero vector is returned to avoid underflow. The superclass of scripts that determine the user's country. The fallback country code. Indicates that the user's country can not be determined. Gets the country code from a `CountryProvider`. If the provider is null, or if it returns a null or empty country, then this method returns . The country provider. The base class for `DidCreate` event arguments. The immutable that corresponds to the newly created game object. It contains all known type, geometry, and metadata information. The immutable Feature.Style.IStyle that was applied during GameObject creation. The newly created game object. The `%DidCreateEventArgs` class constructor. The Feature.MapFeature associated with the newly created GameObject. The style applied during GameObject creation. The newly created GameObject. %Event arguments for DidCreate events. See The `%DidCreateExtrudedStructureArgs` class constructor. %Event arguments for DidCreate events. See %Event arguments for DidCreate events. See %Event arguments for DidCreate events. See %Event arguments for DidCreate events. See %Event arguments for DidCreate events. See Encapsulates event arguments for WillCreate events. See Encapsulates the set of all events fired by the SDK. %Events are part of a mechanism that allows you to style map feature GameObjects. They are fired from various stages of the map feature construction pipeline. The SDK fires `WillCreate` and `DidCreate` events whenever it constructs a and its corresponding during map loading. These events contain geometry and metadata information that you can use to style map feature s.

For more information, see [GameObject creation](/maps/documentation/gaming/tt/concepts_musk#gameobject_creation).
Backing field for . construction pipeline events. Backing field for . construction pipeline events. Backing field for . construction pipeline events. Backing field for Events related to road intersections. Backing field for . construction pipeline events. Backing field for . construction pipeline events. Backing field for . construction pipeline events. Backing field for %RoadLatticeEvents. Events relating to the representing the road network of the currently loaded map. Backing field for . %Events related to the entire map. Backing field for %MapFeatureEvents. %Events related to individual map features. Backing field for %TerrainEvents. %Events related to Terrain. Backing field for %FloatingOriginEvents. %Events related to the floating origin. Encapsulates a WillCreate event. Encapsulates a DidCreate event. Encapsulates Feature.ExtrudedStructure construction pipeline events. Fired when the SDK is about to create an extruded structure GameObject. Note: To prevent Feature.ExtrudedStructure GameObject creation, set `WillCreateEventArgs< TM, TS >.Cancel` to *true*. Fired after creating an extruded structure GameObject. A container for events relating to s. An event that is triggered when the floating origin is moved. Supplied with an offset that can be applied to the position of objects to keep them in sync with the updated floating origin. Event arguments for events. Offset by which to translate game objects to stay in sync with the new floating origin. Constructor. Translation offset corresponding to the movement of the floating origin. Encapsulates an WillCreate event. Encapsulates an DidCreate event. Encapsulates construction pipeline events. Fired when the SDK is about to begin constructing an GameObject. Fired when the SDK finishes constructing an GameObject, and adding it to the %Unity scene. A subclass of UnityEvent that keeps track of the number of runtime-added event listeners. The argument type used in callbacks. The total number of non-persistent event listeners. Adds a listener. The callback. Removes a listener. The callback to remove. Gets the total number of listeners, including persistent ones. Encapsulates event arguments for DidModifyRoadLatticeEvent. The RoadLattice. Constructor. The current road lattice Encapsulates a DidModifyRoadLattice event. Encapsulates a collection of events. Fired immediately after the current road lattice is modified due to the loading or unloading of part of the current map. %Event arguments for Terrain DidCreate events. Style settings to be used to create object. Constructor. Style settings to be used to create object. %Event arguments for Terrain DidCreate events. The that was created. Avoid storing a reference to this object outside of the event handler. As part of map unloading, tiles are destroyed as opposed to de-referenced and garbage collected, resulting in errors if a reference to this object is then accessed. This is a consequence of some Unity objects being backed by unmanaged native objects. Constructor. The that was created. %Event arguments for WillCreateFeatureMaskTexture events. used for generating the into which the feature mask will be rendered using a . Provided to the handler by the SDK. Constructor. %Event arguments for FeatureMaskPreRender events. used to render the feature mask. Provided to the handler by the SDK. Constructor. %Event arguments for AlphaMapsNeedPaint events. component whose alpha maps need painting. Provided to handler by the SDK. containing the feature mask. Provided to the handler by the SDK. Coroutine to paint the alpha maps. Will be stepped to completion or until painting needs to be aborted. Should be initialized in the event handler by the user of the SDK. Finalizer to be executed when either the coroutine has finished executing or painting is aborted. Should be used by the event handler and coroutine to ensure that any resources created for painting are cleaned up correctly. Constructor. %Event arguments for Terrain DidPaint events. The that was painted. Avoid storing a reference to this object outside of the event handler. As part of map unloading, tiles are destroyed as opposed to de-referenced and garbage collected, resulting in errors if a reference to this object is then accessed. This is a consequence of some Unity objects being backed by unmanaged native objects. Constructor. The that was created. Encapsulates a WillCreate event. Encapsulates a DidCreate event. Encapsulates a FeatureMaskPreRender event. Encapsulates a WillCreateFeatureMaskTexture event. Encapsulates a AlphaMapsNeedPaint event. Encapsulates a DidPaint event. Encapsulates a collection of construction pipeline events. Fired before creating a . Fired immediately after creating a .. Fired immediately before the feature mask is rendered. Can be used to perform additional setup before rendering. Fired immediately before the creation of the into which the feature mask will be rendered. Can be used to perform additional configuration of the before the feature mask is rendered into it. Fired when a coroutine is needed to paint the alpha maps for a . Fired immediately after painting a . Arguments for events. Id of the chunk to unload. Constructor. The id of the chunk to unload. Event that is triggered after the collection of map features belonging to a chunk has been fetched and is ready to be loaded into the game world (e.g. through the creation of game objects). The collection supersedes any collection previously loaded for the chunk. Chunks do not share features. The features belonging to a chunk may change over time. This event may be triggered multiple times for the same chunk without any intervening invocation of for that chunk. Chunks are distinguished by identifiers valid only with reference to a particular instance. This event triggers in tandem with other map feature loading processes, e.g. the creation of gameplay objects, but there are no specific guarantees about their relative ordering or timing. This event can be used to create extra game objects or load other data structures derived from map features. Event that is triggered when a chunk is ready to be unloaded from the game world. This can be used to destroy extra game objects or unload other data created using . This event may be triggered multiple times for the same chunk without any intervening invocation of . Events relating to s. See documentation for . See documentation for . Encapsulates a WillCreate event. Encapsulates a DidCreate event. Encapsulates construction pipeline events. Fired when the SDK is about to create a GameObject from a LineWater MapFeature. Note: To prevent Feature.LineWater GameObject creation, set `WillCreateEventArgs< TM, TS >.Cancel` to *true*. Fired immediately after creating a Feature.LineWater GameObject. Encapsulates a map load start event (). Encapsulates a map loaded event (). Encapsulates a map load error event (). Encapsulates a map part loaded event (). Encapsulates the set of events related to fetching and loading the map. Fired immediately before a part of the map begins to load after calling . If you call `LoadMap` more than once before earlier calls have finished loading (e.g., while quickly panning around the map), then the event is triggered only once. Be careful when loading or unloading map regions within this callback as this may cause infinite callback loops. To be safe, consider deferring additional loading until after the LoadStart event has completed. Fired when all and objects from calls to have been loaded. If you call `LoadMap` with an area that has already been loaded, then it triggers the event immediately. If you call `LoadMap` more than once before earlier calls have finished loading (e.g., while quickly panning around the map), then the event is triggered only once—after everything has loaded. If there are errors while loading, then will be non-zero, and some MapFeatures might not be ready. Call LoadMap again to retry. Be careful when loading or unloading map regions within this callback as this may cause infinite callback loops. To be safe, consider deferring additional loading until after the Loaded event has completed. Fired when part of the map fails to load. You get fine-grained control over retry behavior by modifying the arguments to this event. For more information, see . Fired whenever a part of the map finishes loading. This event allows you to track map loading progress. So for example, you could use it to drive a progress bar. Invokes , or writes the error to the console if there is no error listener. The base class for error arguments. The HTTP response code, or 0 if there was no HTTP response. Note: This value can be 200 when the HTTP request succeeds, but contains unexpected content. Contains a set of values that specify additional error information. No additional error information. This version of the SDK is unsupported, possibly in combination with this API key. Note: You should provide an upgrade path and/or a new API key. The request to the Semantic Tile API succeeded, but an error occurred on the client. An error occurred at the network level. The SDK did not receive a response from the Semantic Tile API. Common causes are:
  • Loss of network connection. Consider checking .
  • The request exceeded its deadline. Consider increasing .
The request sent from the SDK to the Semantic Tile API was invalid. The API key does not have permission to make requests to the Semantic Tile API. Ensure the following:
  • The value of is valid.
  • The Semantic Tile API is enabled.
  • A valid billing account is set up.
  • The API key restrictions are met.
Nothing exists at the URL that you used to query the Semantic Tile API. Verify the value of . You exceeded the quota for the Semantic Tile API. An error occurred at the Semantic Tile API server. An unknown error occurred. Check for further details. Additional information about the cause of the error. Error message. The `ErrorArgs` constructor. It includes the HTTP response code, along with the detailed error code and error message. The `ErrorArgs` constructor. Use this constructor for client errors. I.e., when an HTTP request wasn't involved. Converts an HTTP response code to the corresponding . A string representation of the error. This includes the detailed error code, the HTTP response code, and the error message. Encapsulates arguments for . Encapsulates arguments for . The number of network errors since the last `MapLoaded` event. If this value is zero, then all s from calls to before this event are ready. If this value is non-zero, then there might be parts of the map that didn't load successfully. To retry, call `LoadMap` again. Constructor. . Encapsulates the set of arguments for . When part of the map fails to load after a call to , a event is fired before attempting to load it again. A listener can modify the fields of `MapLoadErrorArgs` to change whether it will retry, and if so, after what delay. The default behavior starts with a delay of 0.5 seconds with 1.0 jitter, doubling the delay with each attempt, up to 3 attempts.

Recommendations

  • Handle events and log to the console.
  • On , notify the user that they must update the app.
  • If requests regularly time-out ( with == "Request timeout"), then consider increasing .
  • If requests time-out mainly on slow networks, consider increasing the number of retries instead (set to true if <= a value greater than 3).
  • Don't change or .

Example

            
            mapsService.Events.MapEvents.LoadError.AddListener(e => {
            if (e.DetailedErrorCode == DetailedErrorEnum.UnsupportedClientVersion) {
            log.Error("Update app to latest version");
            return;
            }
// Retry up to 5 attempts. e.Retry = e.Attempts <= 5;
// Log to the console. if (e.Retry && e.IsRetriable) { log.Warning(e); } else { log.Error(e); } });
The number of attempts at loading this part of the map. Indicates whether the request can be retried. Indicates whether to retry loading this part of the map. %Event listeners can modify this value to change the behavior. But it has no effect if is true. The number of seconds to wait for the response from the server after sending the next request. If set to 0, the next attempts waits forever. The length of time to wait before retrying. %Event listeners can modify this value to change the behavior. The of the area that failed to load. Constructor for `MapLoadErrorArgs`. A constructor that takes only a , and a message; and sets all other fields to their defaults. In particular, the error is not retriable, so all retry parameters (, ) are ignored. The detailed error code. A string that contains the error message. Gets the bounds of the area that failed to load. The coordinate system of the (). Arguments for . The progress of requested areas that have finished loading, between 0 and 1. This value can go down in subsequent events if more areas are requested. The s of tiles that finished loading since the last event was fired. Constructor. The list of s of the areas that finished loading. Gets an array of the bounds of the areas that were loaded successfully since the last event was fired. The coordinate system of the (Coord.Coords`). Encapsulates a WillCreate event. Encapsulates a DidCreate event. Encapsulates a collection of construction pipeline events. Fired when the SDK is about to create a modeled structure GameObject. To prevent object creation, set `WillCreateModeledStructureArgs.Cancel` to true. Fired immediately after creating a modeled structure GameObject. Encapsulates a WillCreate event. Encapsulates a DidCreate event. Encapsulates a collection of construction pipeline events. Fired when the SDK is about to create a region GameObject. To prevent object creation, set `WillCreateRegionArgs.Cancel` to true. Fired immediately after creating a region GameObject. Encapsulates a WillCreate event. Encapsulates a DidCreate event. Encapsulates a collection of construction pipeline events. Fired when the SDK is about to create a segment GameObject. To prevent object creation, set `WillCreateSegmentArgs.Cancel` to true. Fired immediately after creating a segment GameObject. Encapsulates a WillCreate event. Encapsulates a DidCreate event. Encapsulates construction pipeline events. Fired when the SDK is about to begin constructing a Feature.AreaWater GameObject. Note: To prevent AreaWater GameObject creation, set `WillCreateAreaWaterArgs.Cancel` to true. Fired when the SDK finishes constructing a Feature.AreaWater GameObject, and adding it to the %Unity scene. The base class for `WillCreate` event arguments. An immutable that corresponds to the GameObject being created. Contains all known type, geometry, and metadata information. An immutable `Style` that will be applied during GameObject creation. To change styles, create a new instance, and assign it to this property. Determines whether to prevent creation for this map feature. Determines whether to generate the resulting as static. Static GameObjects that share the same material can be batched together to save draw calls, but they cannot be transformed. For more information, see [Draw call batching](https://docs.unity3d.com/Manual/DrawCallBatching.html). The `%WillCreateEventArgs` class constructor. The `MapFeature` associated with this GameObject. The `Style` that is about to be applied to the GameObject. Encapsulates event arguments for `WillCreate events. See Encapsulates event arguments for WillCreate events. See Encapsulates event arguments for WillCreate events. See Encapsulates event arguments for WillCreate events. See Encapsulates event arguments for WillCreate events. See Encapsulates event arguments for WillCreate events. See Encapsulates event arguments for WillCreate events. See Arguments for events. The id of the chunk these features belong to. Features are always unloaded by chunk id. The features to load. The instances are not guaranteed to remain valid or retain a coherent identity outside the lifetime of the call to the event handler. The same instance must occur only once in each event. Constructor. The id of the chunk to which the features belong. The features to load. An interface implemented by exceptions intended to be caught outside of the SDK. These exceptions will not be logged by . The base class for %Google.Maps exceptions. The `%MapsException` class default constructor. The `%MapsException` class constructor that takes a message string. The `%MapsException` class constructor that takes a message string and an inner exception. Thrown when you use prior to setting the origin. The `%FloatingOriginNotSetException` class constructor. An unexpected exception thrown within the SDK. This includes exceptions thrown by user code that is run within the SDK (e.g. through a delegate). You can access the original exception object through . Constructor. The exception that was not handled. A that represents a 2D body of water. For example, a lake. The default name to use for the associated GameObject. This name is used when the does not have an explicit display name. A geometric representation of the Water. The feature metadata as a The %AreaWater calss constructor. A geometric representation of the Water. The coordinates of the tile containing this feature. Associated metadata. A that represents an extruded structure. For example, a building extruded from footprint and height data. Backed by shape geometry. The default name to use for the associated GameObject. This name is used when the doesn't have an explicit display name. Translates this by the given offset. The relative offset by which to translate the origin. A geometric representation of the %ExtrudedStructure. The feature metadata as a . The %ExtrudedStructure class constructor. A geometric representation of the Structure. The coordinates of the tile containing this feature. Associated metadata. Unity-independent representation of immutable properties of an intersection feature. Constructor. The 's pseudo-place ID. The name of this feature, used to name generated Unity objects. Tile content that can be stored in a . Updates this tile's floating origin, and translates all geometry in the tile to accommodate the origin change. The Coords from which to extract the new floating origin; and to use to calculate the necessary translation. Static methods for generating place IDs. Make place ID for a Mercator tile feature. Coordinates of the Mercator tile. Place ID for the specified Mercator tile. A %Unity-independent representation of immutable properties of a land region. The default color of beaches. The default color of forests. The default color of parks. The default color of generic Regions. The default color of undefined Regions. A set of values the specify how a %Region is used. The usage type is unspecified. A park or botanical garden. A beach. An area of land covered by trees. Specifies the way in which the %Region is used. The %RegionMetadata class constructor. The %Region's Place ID. The name of this feature, used to name generated Unity objects. The way in which the Region is used. Returns the default color for the given UsageType. The type of feature. The color for the UsageType. A %Unity-independent representation of immutable properties of a 2D path. For example, of a road. A set of values that specify how a %Segment is used. The usage type is unspecified. A thoroughfare intended for use by motor vehicles. Roads that have the lowest speed limit, that carry low volumes of traffic. In some areas, local roads are unpaved. A high-capacity urban road. Delivers traffic from collector roads to highways. Limited access freeways, state highways, motorways, and toll roads. A highway with grade-separated crossings that is accessed exclusively by ramps. These are usually called "freeways" or "motorways". A pedestrian way, walking trail, or nature trail. These thoroughfares are intended for use solely by pedestrians, and not for other forms of traffic like motorized vehicles, cycles, or horses. A railroad. A route over water that is part of the road network, but that is travelled by car-carrying vessels. Specifies the way in which the %Segment is used. Indicates whether the segment is marked as private. E.g., a road that has signage discouraging or prohibiting use by the general public such as signs that say "Private", or "No trespassing." The %SegmentMetadata class constructor. The %Segment's Place ID. The name of this feature, used to name generated %Unity objects. The way in which the %Segment is used. Indicates whether the segment is a private road. Creates a deep copy of this . A deep copy. An immutable representation of a point combining floating point and integer representations of a position the integer coordinates being absolute coordinates on a mercator projection, and the floating point coordinates being relative to a Unity world space origin. The canonical reference size for a tile (hitorically, raster tile pixel count) The scale factor by which coordinates served by Factile are scaled relative to the canonical tile size. The range of integer coordinates within a tile. The maximum supported zoom level. The minimum supported zoom level. Immutable Global Mercator Space integer coordinate. For the finest supported tile zoom factor (18) these values will range over: [0, 2^18 * 4096]. Also note: the Y coordinate of the 2D integer coordinate increases to the north, as opposed to the canonical coordinates-within-tile representation in which Y value grows to the south. Mutable Unity world space coordinates. Note: Y value increases to the north, as opposed to the canonical coordinates-within-tile representation in which Y value grows to the south. Creates a GlobalCoordinate from integer and floating point location. This should become obsolete as we transition to using GlobalCoordinates everywhere, and as such the constructor from TileCoord and Vector2Int should be prefered where possible. MercatorCoordinates Value WorldSpaceCoordinates Value Makes a copy of this GlobalCoordinate with offset WordSpaceCoordinates. The amount to offset WorldSpaceCoordinates. The modified copy. Linearly interpolates between two GlobalCoordinates using the supplied parametric value. First GlobalCoordinate Second GlobalCoordinate Interpolation amount Constructs a GlobalCoordinate from a tile coordinate and a point within that tile. This method ensures that is in a compatible reference frame to construct a from, such that all integer coordinates have the same, canonical meaning. The WorldSpaceCoordinates are initialized relative to the origin of the tile, i.e., assuming the world space origin corresponds to the south west corner of the tile. The coordinates of the source tile The location within the source tile Word space size of the tile. Projects the given integer coordinates to zoom level . projected to . Validates the given zoom level, logging a warning if it is unsupported. The zoom level to validate. True if the zoom level is valid. A %Unity-independent representation of immutable properties of a structure. For example, of an extruded or modeled building. A set of values that specify how a Structure is used. The usage type is unspecified. A retail business establishment that serves alcoholic beverages, such as beer, wine, and liquor. A financial institution that accepts deposits from the public, and creates credit. A type of residential accommodation. People who travel and stay away from home for more than a day need lodging for sleep, food, and shelter. A retail business establishment that sells coffee, tea, and sometimes light meals. A retail business establishment that prepares and serves food and drinks to customers in exchange for money. A public or private location that hosts performances or sporting events. A place of interest to tourists, typically for natural or cultural value. A public location that contains retail businesses (a shopping center). Institution where young people receive general (not vocation or professional) education. Specifies the way in which the %Structure is used. The %StructureMetadata class constructor. The Place ID. The name of this feature, used to name generated Unity objects. The way in which the Structure is used. A that represents a line-like water feature. For example, a river. The default name to use for the associated GameObject. This name is used when the doesn't have an explicit display name. A geometric representation of the Water. The feature metadata as a The %LineWater class constructor. Geometric representation of the Water. The coordinates of the tile containing this feature. Associated metadata. A %Unity-independent representation of immutable properties of a geographical feature. A single %MapFeatureMetadata object exists for each geographical feature (PlaceId). Note: Due to chunking, geographical features can be split across multiple s and corresponding s. An alphanumeric string that uniquely identifies a geographic feature in the %Google Places database, and on %Google maps. For example, *ChIJzRqWFBWuEmsRFiCT1SLJHY8*. You can store and use Place IDs across SDK sessions. For example, you can store the Place ID of a 3D building, and then use it later to suppress the building, or to swap it out with a custom mesh. For more information, see [Place IDs](/places/place-id). The name of this %MapFeatureMetadata object. The %MapFeatureMetadata class constructor. The map feature's Place ID. The %MapFeature's name. Returns the string representation of this %MapFeatureMetadata. object. I.e., the `Name` and `PlaceId`. A collection of MapFeatures on a single tile. The coordinates of the tile. The providers of this map tile. Scaling multiplier used to stretch map tile geometry (in "tile local" coords) into Unity Worldspace (Vector3). The origin specifying the reference frame for the coordinates of all features in this tile. Extruded Structures found on the tile. Modelled Structures found on the tile. Regions found on the tile. Segments found on the tile. LineWater found on the tile. AreaWater found on the tile. Lattice representing roads present on the tile. Constructor. Tile coordinate. Tile scale. The floating origin providing the reference frame for coordinates of features in this tile. The providers of this map tile. Translates the origin of each in the tile. An offset vector used for translating each . Moves the RoadLattice by the provided offset. This is a separate method as it is necessary to invoke it independently of other feature translation once, when the tile is decoded by the FeatureTileDecoder, and the road lattice is generated outside the FeatureTileDecoder. The amount by which to move the road lattice Returns an enumerable including all of the s on this tile. An instance for all map features on this tile. Updates the road lattice of this tile based on the segments in this tile. Whether to search for intersections optimized away in the source data. A that represents a modeled structure. For example, a building with detailed vertex/triangle data. Backed by shape geometry. The default name to use for the associated GameObject. This name is used when the doesn't have an explicit display name. A geometric representation of the %ModeledStructure. The feature metadata as a The %ModeledStructure class constructor. A geometric representation of the Structure. The coordinates of the tile that contains this feature. Associated metadata. Mutable data associated with a map feature. There's a one-to-one correspondence between MapFeatures and generated %Unity GameObjects. Due to feature chunking, there can be multiple GameObjects representing a feature in the %Unity scene, with each one having a unique %MapFeature but with all sharing a common . Note: The tile coordinates and geometry of this feature can change if additional feature chunks are combined for the same PlaceId through feature chunk stitching. Metadata associated with this %MapFeature. Due to chunking, multiple %MapFeatures can reference the same The default name to use for the associated GameObject. This name is used when the doesn't have an explicit display name. Returns the shape of a if it has one. Returns a instance representing the shape of the feature if it has one, otherwise returns null. The (x,y) coordinates of the %Google %Maps tiles that contain this map feature. For more information, see [Map and Tile Coordinates](/maps/documentation/javascript/coordinates). Note: This is a mutable collection to facilitate feature stitching. The name used for the GameObject associated with this %MapFeature. The %MapFeature class constructor. Metadata associated with this feature. Tile Coordinates. Returns the metadata from this feature, cast to a feature-specific type. The cast metadata. The type to cast the metadata to. A that represents a 2D region. For example, a park. Backed by shape geometry. The default name to use for the associated GameObject. This name is used when the doesn't have an explicit display name. Contains the geometric representation of the %Region. The feature metadata as a . The %Region class constructor. A geometric representation of the %Region. The coordinates of the tile that contains this feature. Associated metadata A string representation of this %Region. I.e., its `PlaceID`. A that represents a 2D path. For example, a road. Backed by shape geometry. The default name to use for the associated GameObject. This name is used when the doesn't have an explicit display name. A geometric representation of the %Segment. The name of the GameObject associated with this . The feature metadata as a . The %Segment class constructor. A geometric representation of the %Segment. The coordinates of the tile that contains this feature. Associated metadata. Creates a deep copy of this . A deep copy of this. A geometric representation of a flat %MapFeature. For example, a park. 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)]. The vertices of the edge sequence. Constructor. The vertices of the contiguous edge sequence. Class used for building up edge sequences. The edge sequences that we're building up. The vertices in the current edge sequence. Constructor. Add a vertex to the current sequence. The vertex to add. Terminates the current sequence and adds it to the list of sequences. If the current sequence is degenerate (contains only one vertex) it will not be added. Get the list of edge sequences built so far. If there is a partial, unterminated current sequence, it will be ignored. So it is important to call TerminateSequence on the last edge sequence. The list of edge sequences built so far. Specifies the winding order of a triangle. Degenerate indicates that triangle has zero area, and thus no determinable winding order. Vertices that make up the Area's border. This is relative to the . Separates the Area's vertices into discrete intervals, each one that describes an individual polygon. Triangles that make up an Area's polygon. A triangle is represented as a triplet of indices into the Area's Vertices array. The z-order of this area, as returned in the tile data from Factile. For each vertex, stores the next vertex in the polygon boundary loop. You can use this to check whether an edge is external to the polygon. Contains whether each edge in the area is external to the feature. An external edge is one that borders another feature. These external edges may be used for styling. For example, when drawing borders around regions, they should only be drawn on the external edges of the area. Currently, this field is only supported for the AdministrativeArea1, Locality, and Sublocality feature types. This array will always have the same number of elements as the Vertices array. For each vertex index i, the edge from vertex i to NextVertexInLoop[i] is external iff ExternalEdges[i] is true. Constructs an area with no external edges. Included for backwards compatibility. The vertices that make up the Area's border. When you separate the Area's vertices into discrete intervals, each one describes an individual boundary loop of the area. You can use this to check whether an edge is external to the area. Each vertex break is an index into the vertices array, and indicates the start of a new loop. For example, if there are 10 vertices, and a break at vertex index five, then vertices 0-4 comprise one loop, and vertices 5-9 comprise another loop. A collection of integer triples that make up the Area's triangles. Each integer is an index into the collection of vertices. The z-order of this Area. Defaults to zero. Determines whether the newly created Area will have its coordinates modified to be relative to the center of its bounding box. See also, Recenter(). The %Area class constructor. The vertices that make up the Area's border. When you separate the Area's vertices into discrete intervals, each one describes an individual boundary loop of the area. You can use this to check whether an edge is external to the area. Each vertex break is an index into the vertices array, and indicates the start of a new loop. For example, if there are 10 vertices, and a break at vertex index five, then vertices 0-4 comprise one loop, and vertices 5-9 comprise another loop. A collection of integer triples that make up the Area's triangles. Each integer is an index into the collection of vertices. Indicates which of the edges are external to the area and border another feature. This should be the same size as the vertices parameter. The z-order of this Area. Defaults to zero. Determines whether the newly created Area will have its coordinates modified to be relative to the center of its bounding box. See also, Recenter(). Constructs an empty Area. That is, an Area that has no vertex, vertex break, or triangle information. Determines whether this Area is empty. An Area is empty if it doesn't contain a vertex, a vertex break, or triangle data. Determines whether the edge between the verticies at index v1 and v2 is external to the polygon. Combines all the areas in the supplied array into a single area. Concatenates the vertex lists and adjusted triangle and breaks lists where the indices in the latter two are adjusted for the new positions of their respective vertices in the combined vertex lists. The areas to combine. The zOrder for the new, combined area. The combined area. Rescale the coordinates of this , modifying vertices, origin and tile boundary crossing points. Scale factor. Type specific equality method. Returns the winding order of the triangle described by the supplied vertices considered in the supplied order. First vertex Second vertex Third vertex Winding order Swap two vertices and associated indices. First vertex. Second vertex. First vertex index. Second vertex index. Returns a list of lists of vertices, each inner list representing a contiguous edge run for this Area. The returned edge runs will form closed loops in anticlockwise winding order. This means that the outside of the Area is to the right of each edge. A List of connected edge sequences, each sequence represented by a list of vertices where each a list of n vertices represents n - 1 contiguous edges: [v0, v1], [v1, v2], ..., etc. The vertices are in world space. Returns a list of lists of vertices, each inner list representing a contiguous edge run for this Area. Only external boundary edges will be returned. The returned edge runs will form closed loops in anticlockwise winding order. This means that the outside of the Area is to the right of each edge. This method will return only the edges that are external to the map feature (that is, they border another feature). This makes this method good for adding borders to regions. A List of connected edge sequences, each sequence represented by a list of vertices where each a list of n vertices represents n - 1 contiguous edges: [v0, v1], [v1, v2], ..., etc. The vertices are in world space. Returns the next vertex in an edge loop. Useful for getting the boundaries of an area. An index into the Vertices list. An index into the Vertices list representing the next vertex in the edge loop. Changes the edge loops and triangle indices of the area so that they form anticlockwise loops. This makes it easier to construct extruded buildings with the walls facing the right way. A geometric representation of a %MapFeature made up of a collection of extrusions. A footprint together with base and top heights. The height of the Extrusion's base. The height of the Extrusion's top. The extrusion's footprint. The height of the Extrusion. An `%Extrusion` class onstructor. Footprint of the extrusion. Altitude of the Extrusion's base. Altitude of the Extrusion's top. An `%Extrusion` class onstructor. Extrusions constructed from this constructor have no supplied height information. The footprint of the extrusion. An `%Extrusion` class constructor. The vertices that make up the Extrusion's footprint. The footprint's vertices separated into discrete intervals, with each one describing an individual polygon. A collection of integer-triples that make up the footprint's triangles. Each integer is an index into the supplied collection of vertices. The height of the %Extrusion's base. The height of the %Extrusion's top. Gets a bounding box for all of the geometry represented by this object. Creates a clone of this %Extrusion, sharing a reference to this %Extrusion's Footprint, but with modified MinZ and MaxZ values. The new MinZ value for the clone. New MaxZ value for the clone. A clone of this Extrusion with new MinZ and MaxZ. Value under which height is considered to be effectively zero. The %Extrusions that make up this `%ExtrudedArea`. True if the height data is as reported by the server. If not then the value was generated by other means as is the case, for example, when the server sends no height data in the first place. Specifies whether the geometry of this %ExtrudedArea crosses a tile boundary. Constructor. Collection of Extrusions that make up the ExtrudedArea. Is the height value server-supplied? Whether any geometry crosses a tile boundary. Private constructor that allows the suppression of recentering of generated ExtrudedArea around the origin of the 's bounding box. A collection of Extrusions that make up the ExtrudedArea. Is the height value server-supplied? Whether any geometry crosses a tile boundary. Whether to transform the coordinates of this ExtrudedArea to be relative to the center of the bounding box of the ExtrudedArea (see Recenter method). Creates a clone of this extruded area with the height (MaxZ) of all extrusions set to the supplied height. Each extrusion of the generated clone shares a reference to the footprint of the cloned extrusion. For more information, see . The height to set the MaxZ of each cloned extrusion to. Does the height come from the server? A clone with all extrusions set to the supplied height. Constructs a new %ExtrudedArea as a linearly-scaled clone of the this %ExtrudedArea. Each extrusion of the generated clone shares a reference to the footprint of cloned extrusion. For more information, see . The height to scale this %ExtrudedArea to. Does the height come from the server? A scaled clone of this %ExtrudedArea Constructs a new %ExtrudedArea as a clone of this %ExtrudedArea, with all MaxZ values raised such that the lowest Extrusions are of at least the specified height. The lowest s are defined as all of the s with the lowest minimum z value. Where multiple s share the same value, the shortest one is used to determine the height delta applied to the entire . The delta is applied to the entire to ensure it otherwise retains its profile. If the shortest base-level is taller than minBaseHeight, no height adjustment occurs. Each extrusion of the generated clone shares a reference to the footprint of cloned extrusion. For more information, see . The minimum height of the shorted base-level . A scaled clone of this %ExtrudedArea Helper function for producing modified clones of this . The main job of this method is to preserve the Origin in the clone. This is achieved by setting the recenter parameter to the constructor to false (to prevent modification of the supplied s) then copying the Origin by calling on the clone. Extrusions to include in the clone. Is the height value server-supplied? Overhangs property of the clone. The generated ExtrudedArea. A geometric representation of a 2D path on a map. Closeness factor used to determine if a vertex is close to a boundary. Tile size in unscaled tile coordinates. The vertices that make up the Line. Integer versions of the vertices that make up the Line, locating the vertices in a world scale Mercator based integer coordinate system. The coordinate system combines tile coordinates and infra-tile coordinates, essentially: TileCoordinate * 4096 + InfraTileCoordinate These integer vertex values are globally unique, immutable (in that they are not affected by or ), and maintained in addition to the floating point vertices for the purpose of more accurate feature coordinate matching for intersection detection and road lattice generation. As this is a publicly visible feature class, Vector2 and Vector2Int values are stored in parallel in order not to break existing client code that accesses the float vertices. This will be required til such time as we move to a unified integer-plus-float representation of vertices throughout the SDK, such as the type. Indicates whether the corresponding vertex in the array lies on a tile boundary. The z-ordering of the line. Lines with a higher z-order are rendered above lines with a lower z-order. Private utility constructor to support both Vector2 constructor and GlobalCoordinate constructor. Collection of Vector2s that make up the segment. Vector2Ints corresponding to the supplied Vector2s Z-order of the line. The `%Line` class constructor. Legacy constructor to support client code that predates addition of integer vertices. Collection of Vector2s that make up the segment. Z-order of the line. A `%Line` constructor that accepts both float and integer versions of vertices in the form of values. See comments for an explanation of why we need to extract the integer and float versions into separate arrays rather than storing the original GlobalCoordinate values. The provision of arguments in the form of values obivates the need to provide some kind of error handling for the case where the number of integer and float vertices does not match, and provides a path to a potential future where all coordinates are specified this way. Collections of vertices in integer-plus-float format Z-order of the line Utility method to extract integer components from a collections of GlobalCoordinate values. GlobalCoordinate values. A collection of the Vector2Int values extracted from the input vertices. Utility method to extract float components from a collections of GlobalCoordinate values. GlobalCoordinate values. A collection of the Vector2 values extracted from the input vertices. Returns whether the vertex indicated by the supplied index lies on a tile boundary. Index of vertex to test. If the indexed vertex is on a tile boundary. Translates the shape by the supplied offset. An offset vector used for translation. Scales the shape by the supplied scale. Scale factor. Calculates and returns a bounding box for all the geometry represented by this object. Calculates which vertices lie on the border of a square of given size. Vertices to check for boundary proximity Size of the boundary square How close coordinates of a vertex must be to the boundary to be considered on the boundary A boolean array indicating for each supplied vertex if that vertex lies within the supplied epsilon distance of any edge of the square ranging from (0, 0) to (boundsSize, boundsSize). Creates a deep copy of this . A deep copy of this. Represents a collection of Shape.Lines used to represent a 2D path on a map, such as a road, train line or ferry route. The Lines that make up the LineGroup. Constructor. Collection of Lines that make up the LineGroup. Creates a deep copy of this . A deep copy of this. Creates a shallow copy of this . The shallow clone references a new list of s but the list contains the same Line objects as this LineGroup. A shallow clone of this. Describes the geometric information for a Feature (such as a building or road). All geometry in this class is relative to the . Indicates whether the current value of CachedBoundingBox is up to date. The value of the bounding box last generated by a call to CalculateBoundingBox. The bounding box of all of the geometries in this %MapFeatureShape. This is always relative to the parent . The two-dimensional origin of the coordinate system for all contained vertices. I.e., all vertices in FootPrints of Extrusions are measured relative to this origin. This origin is relative to the parent of the , which is either the that contains a , or another MapFeatureShape. Constructs a GeometricMapFeature with empty BoundingBox at (0,0,0). Sets the to be the center of its bounding box, and transforms all contained geometries to be relative to this origin. Translates the geometry by the supplied offset. This does not change the position of the . An offset vector used for translation. Moves the by the supplied offset. An offset vector used for translation. Calculates and returns a local bounding box for all of the geometry represented by this object. The bounding box is located relative to the Shape's origin, which means that the center of it might not be at (0, 0) if the is not at the center of all of the vertices. Marks the cached value of CachedBoundingBox as out of date. Return a %Unity `Bounds` object that encapsulates the supplied vertices. Return a %Unity `Bounds` object that encapsulates the supplied vertices. A geometric representation of a 3D volume constructed by explicitly specifying geometry data. The %ModeledVolume's vertices. Separates the %ModeledVolume's vertices into discrete intervals, where each interval describes an individual mesh. The triangles that make up the %ModeledVolume. Each triangle is represented as a triplet of indexes into the %ModeledVolume's Vertices array. The %ModeledVolume class constructor. The vertices that make up the mesh. The %ModeledVolume's vertices, separated into discrete intervals, with each one describing an individual polygon. A list of vertex indices that make up the mesh triangles. Each triplet represents a distinct triangle. Attaches styling settings to any components residing on the same . Style settings for area water features. Style settings for line water features. Style settings for region features. Style settings for segment features. Style settings for modeled structure features. Style settings for extruded structure features. Enumerate all of the attached instances. An enumerator for all of the attached instances. Listens for changes to the instances attached to this component. Reference to a instance. Used to refresh the instance whenever one of the settings assets reports a change. Has finished executing? Listen for changes to the settings assets and refresh the instance if any are detected. Arguments to . Handle OnEnable event. Handle OnDisable event. Handle Reset event. Intended to handle a change to any of the references to a settings asset. Refreshes and ensures that is installed on the correct settings assets. Update a instance with the style settings attached to this attachment. The to update. Encapsulates immutable styling information used to control how GameObjects are generated from s. A set of values that specify how the roof material is aligned. Align the material in the XZ-axes of the parent . Align the material in the direction of the . The %ExtrudedStructureStyle builder. The type of alignment used to align the roof material, as one of the ExtrudedStructureStyle.RoofMaterialAlignmentType enumeration values. Specifies whether to override the ExtrudedStructure's height with FixedHeight. The default value is *false*. When ApplyFixedHeight is set to *true*, the ExtrudedStructure is scaled to this height, measured in meters. The default value is *1*. The height applied to buildings extruded from a footprint only. This applies to buildings that contain no height information. The default value is *10*. When the value of this property is *0*, footprint-only buildings aren't extruded, and appear on the map as normal regions. If this property is set with a value, then it replaces all of the GamesObjects that the style is applied to—with this prefab. The default value is *null*. The ExtrudedStructure's roof material. The default value is *null*. The ExtrudedStructure's wall material. The default value is *null*. The %Builder class default constructor. A %Builder copy constructor that shallow-copies style values into the builder. Use this copy constructor when you want to create a new style object based on an existing . A Style object. Builds a new object from the values set on the builder. Default styles. Specifies how the roof material is aligned. The default is to align the roof material in the direction of the . Specifies whether to override the ExtrudedStructure's height with . The default value is *false*. When is set to *true*, the ExtrudedStructure is scaled to this height, measured in meters. The default value is *1*. The height applied to buildings where the feature shape has no server-supplied height. Defaults to *10*. If a value for the property is set, then it replaces all of the GamesObjects that the style is applied to with this prefab. The default value is *null*. The ExtrudedStructure's roof material. The default value is *null*. The ExtrudedStructure's wall material. The default value is *null*. Returns a new based on this style object. Immutable styling information used to control how GameObject are generated from s. Encapsulates immutable styling information used to control how GameObjects are generated from s. builder. Constructor. A copy constructor that shallow-copies style values into the builder. Use when creating a new style object based on an existing . The style object. Builds a new from the values set on the builder. Default styles. Returns a new based on this style object. Encapsulates immutable styling information used to control how GameObjects are generated from s. The builder. The Builder class default constructor. A copy constructor that shallow-copies style values into the builder. Use this copy constructor when you want to create a new Style object based on an existing . The Style object. Builds a new from the values set on the builder. Default styles. Returns a new based on this style object. Encapsulates immutable styling information used to control how GameObjects are generated from s. The %ModeledStructureStyle builder. If this property is set with a value, then it replaces all of the GamesObjects that the style is applied to—with this prefab. The default value is *null*. A Material to apply to the entire building. The default value is *null*. The Builder class default constructor. A copy constructor that shallow-copies style values into the builder. Use this copy constructor when you want to create a new style object based on an existing . The Style object. Builds a new ModeledStructureStyle from the values set on the builder. Default styles. If this property is set, then it replaces all of the GamesObjects that the style is applied to—with this prefab. The default value is *null*. A Material to apply to the entire building. The default value is *null*. Returns a new based on this style object. Encapsulates immutable styling information used to control how GameObjects are generated from Area related feature types such as and . builder. Specifies whether to draw the area with a fill. The default value is *true*. The material used to fill the area. This value will be *null* for non-textured areas. The default value is *null*. Specifies whether to draw the Area with an outline. The default value is *false*. Styling information for the Area outline. The default value is . The %RegionishStyleBuider class default constructor. A copy constructor that shallow-copies style values into the builder. Use this copy constructor when you want to create a new style object based on an existing . The Style object. Specifies whether to draw the area with a fill. The default value is *true*. Area fill material. If this is null then a reasonable default will be used. Compatible with materials produced using , which includes a utility for producing materials with a uniform color. Defaults to null. Specifies whether to draw the Area with an outline. The default value is *false*. Styling information for the Area outline. The default value is . Encapsulates immutable styling information used to control how GameObjects are generated from s. The %RegionStyle builder. Thne Builder class default constructor. A copy constructor that shallow-copies style values into the builder. Use this copy constructor when you want to create a new style object based on an existing . The Style object. Builds a new from the values set on the builder. Default styles. Returns a new based on this style object. Encapsulates immutable styling information that is used to control the way that GameObjects are generated from line-related feature types—such as and . The %SegmentishStyle builder. A material to apply to the segment. Meshes created using the style default to %Unity's default MeshRenderer material in the event that no material is provided. The default value is *null*. The width of the Segment, in meters. The default value is *10*. A material to apply to the border of the segment. If a value for `%BorderMaterial` isn't set, then this value will be *null*, and no border is drawn. If a value is set, then an additional GameObject is created to represent the border of the Segment. This GameObject is a child of the primary GameObject, and is identical except for width, which is controlled by and . To be effective, this material should have all of the properties of a normal basemap material, but with a value that causes it to be rendered between basemap features and the primary segment . The border material is intended for use with roads of a single flat color. If a value for `%BorderMaterial` is set, then the z-ordering for roads won't work. This works fine for flat colored roads, but `%BorderMaterial` should not be used with textured roads. The width of the Segment border, in meters. The default value is *1*. The `%BorderWidth` is applied outside the segment. For example, a segment with `%Width` of *10* and `%BorderWidth` of *1* will have a total width of *12* meters. `%BorderWidth` is applied only when a is not *null*. The `%SegmentishStyleBuilder` class default constructor. A copy constructor that shallow-copies style values into the builder. Use this copy constructor when you want to create a new style object based on an existing . The Style object. A material to apply to the segment. Meshes created using the style default to %Unity's default MeshRenderer material in the event that no material is provided. The default value is *null*. The width of the Segment, in meters. The default value is *10*. A material to apply to the border of the segment. If a value for `%BorderMaterial` isn't set, then this value will be *null*, and no border is drawn. If a value is set, then an additional GameObject is created to represent the border of the Segment. This GameObject is a child of the primary GameObject, and is identical except for width, which is controlled by and . To be effective, this material should have all of the properties of a normal basemap material, but with a value that causes it to be rendered between basemap features and the primary segment . The border material is intended for use with roads of a single flat color. If a value for `%BorderMaterial` is set, then the z-ordering for roads won't work. This works fine for flat colored roads, but `%BorderMaterial` should not be used with textured roads. The width of the Segment border, in meters. The default value is *1*. The `%BorderWidth` is applied outside the segment. For example, a segment with `%Width` of *10* and `%BorderWidth` of *1* will have a total width of *12* meters. `%BorderWidth` is applied only when a is not *null*. Encapsulates immutable styling information used to control how GameObjects are generated from s. The %SegmentStyle builder. The `Builder` class default constructor. A copy constructor that shallow-copies style values into the builder. Use this copy constructor when you want to create a new style object based on an existing . The Style object. Builds a new from the values set on the builder. Default styles. Returns a new based on this style object. Abstract base class for style settings scriptable objects. Arguments for . The on which some values were changed. Constructor. Event that is triggered when the values of a are changed. See documentation for . Notify listeners that the settings on this instance have changed. Handle Unity's OnValidate event. Style settings scriptable object for area water styles. The material used to fill the area. Specifies whether to draw the Area with an outline. The default value is *false*. Listens to for changes. Handle Unity's OnEnable event. Handle Unity's OnValidate event. Apply settings to . to apply settings to. New with settings applied to it. Scriptable object for extruded structure settings. The type of alignment used to align the roof material. Specifies whether to override the ExtrudedStructure's height with FixedHeight. When ApplyFixedHeight is set to *true*, the ExtrudedStructure is scaled to this height, measured in meters. The height applied to buildings extruded from a footprint only. This applies to buildings that contain no height information. The material to apply to the roofs of extruded structures. The material to apply to the exterior walls of extruded structures. Apply settings to . to apply settings to. New with settings applied. Scriptable object for segment style settings. Fill material for segments. Segment width. Apply settings to . to apply settings to. New with settings applied. Scriptable object for modeled structure settings. The material to use with the structure's model. Apply settings to . to apply settings to. New with settings applied. Style settings scriptable object for area water styles. The material used to fill the area. Specifies whether to draw the Area with an outline. The default value is *false*. Listens to for changes. Handle Unity's OnEnable event. Handle Unity's OnValidate event. Apply settings to . to apply settings to. New with settings applied. Scriptable object for segment style settings. Fill material for segments. Intersection material for segments. The length of the intersection arms. If the length of a road connecting two intersections is shorter than the join length, the two intersections are joined. In most cases, this should be greater than twice the arm length to avoid overlapping arms. The maximum distance an intersection arm can start from the center of the intersection it's connected with. Two roads may overlap indefinitely, usually caused by a large road width. In these cases, it may not be possible to generate an acceptable intersection. Settings a maximum arm distance prevents abnormally large intersections from being generated. Segment width. Material for borders. *null* if there is no border. Border width. Apply settings to . to apply settings to. New with settings applied. Listens for changes to an instance. Updated by . Holds a reference to the instance we're listening to. The delegate to trigger when the changes. Constructor. The delegate to trigger when the changes. Update the reference to the instance that we're listening to. Adds as a listener on the new instance, if any, and removes it from the previous instance, if any. Unity-independent representation of immutable properties of water feature. Constructor. Place ID. The name of this feature, used to name generated Unity objects. Encapsulates styling options for map feature GameObjects. The default style applied to generated Feature.Segment GameObjects. The default style applied to generated Feature.Region GameObjects. The default style applied to generated Feature.ExtrudedStructure GameObjects. The default style applied to generated Feature.ModeledStructure GameObjects. The default style applied to generated Feature.AreaWater GameObjects. The default style applied to generated Feature.LineWater GameObjects. The default style applied to generated Terrain GameObjects. Style used to create a . Builder for instances. Layer to place into. If null layer is not modified. Constructor. Constructor to make a builder from a instance. to construct builder from. Layer to place into. If null layer is not modified. Interface for clients of . Clients should not start coroutines until has been triggered. If is triggered, no further coroutines should be started until has been triggered again. When this event is triggered, it means that has stopped all of its coroutines. This can happen at any point without any intervention from clients of . Restore the client to a valid state and wait until to start any coroutines. When this event is triggered, it is safe to start coroutines until is triggered. Provides a instance on request. Returns a instance. Handles impressions reporting. Duration to wait between saving presented impressions to disk. Duration to wait between checking if any network requests need to be made. Maximum number of impressions that can be logged to the server in a batch. Request headers specifying the post data content type, and app identifiers on mobile platforms. Thread used to load/save impressions from/to disk. Queue of impressions to send to the server. Impressions that came in while waiting for the file reading thread to finish. Tracks presented impressions. Thread-safe. API key. Part of Unity's MonoBehaviour lifecycle. Called by Unity when the script is enabled. Starts the background coroutines (note that Unity cancels coroutines when the script is disabled). Called by Unity when the script is disabled. Stops the background coroutines in case Unity doesn't, in order to prevent duplicates when the script is re-enabled. Part of Unity's MonoBehaviour lifecycle. Sets the API key. Loads the persisted state from disk. Periodically saves presented impressions state to disk. This is run in its own thread, which is started in Awake(). Logs an impression. Processes all pending impressions. Processes an impression. The ImpressionInfo to process. Processes an impression of type Presented. The impression to process. Processes an impression of type Interaction. The impression to process. Converts a place id to a playable location resource name. Regularly checks if there are any pending network requests and sends them. Information about an impression to log to the server. Location and in game type. Type of impression. Constructor. A game object location, containing both the location and the in-game type placed there. Game object type. Place ID. Constructor. Returns whether this object is equal to the given object. Tracks when playable locations were last presented to the user in order to deduplicate impressions sent to the server. This class is thread-safe. Lock guarding mutable instance variables. Lock guarding read/write to disk. If impressions have not been presented within this time span, they are removed. Path to persist state to. System clock. Map from game object locations to the most recent time they were presented to the user. Location is removed from this dictionary when the player interacts with it. Whether the Presented dictionary has been modified since last save. Whether the state has been loaded from disk. Constructor. Path for saving the presented impressions to disk. System clock interface. Whether the presented impressions state has been loaded. Loads presented impressions from disk. Removes all expired presented impressions. Removes expired presented impressions and saves the state to disk, if the Presented dictionary has been modified since last save. Adds a presented impression and returns true if it is new. Removes a presented impression. Interface for class providing basic file operations. Returns true if the given file exists. The path to check for existence. True if the file exists, false otherwise. Deletes a file if it exists. If the file doesn't exist, does nothing. The path of the file to delete. Thrown if file couldn't be deleted. Creates a file if it doesn't exist already. The path of the file to create. Thrown if file couldn't be deleted. For now we just need to create the file, not read or write it. In the future, this might be adapted to return an abstract stream handle to perform these operations on. Returns a path where data will be persisted between sessions. Concatenates two file paths. implementation for Unity. Script that attaches to a GameObject with a Camera component, and loads a region of the map visible to that camera. The to be used to load the map. Zoom level at which to load the map. Enum representing the possible shapes of map regions to load. Loads a circular region of the map centered on the camera. Loads the region of the map visible to the camera. Shape of region to load. Maximum distance from the camera at which to load the map. Only unload parts of the map that have been inactive for at least this long. Options used to load the map. Initialized with . Camera component of the GameObject that this script is attached to. Component of the GameObject that contains mixed zoom options. Called by Unity when the script is enabled. Initializes the script with options to use when loading the map. This must be called before is called for the first time. Options used to load the map. Loads the region of the map based on the camera's current position. Unloads parts of the map that have not been loaded or displayed in the last seconds. Called by Unity before the attached camera culls the scene for rendering. The visibility of GameObjects to the attached camera is determined after this method is called. See https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnPreCull.html for more information. Adds a load region shape to the given . The to add the region shape to. Extra parameters for a to load the map at lower zoom levels further from the camera. Parts of the map within this many world space units of the camera position will be loaded at the zoom level set by . The distance beyond that is loaded one zoom level lower than the level set by . After that, the distance between zoom levels doubles each time. Parameters for mixed zoom, bundled together for passing around internally. Foreground zoom level, between 0 and 17 inclusive. Distance from the camera location to load at . Distance between and the next drop in zoom level. Constructor. Foreground zoom. Foreground distance. Falloff distance. Handles loading and saving Clearcut logs from and to disk. Full path of the file to load from and save to. Work queue to save metrics on a separate thread. The next time that will write to disk. Minimum interval between writes for . Constructor. Full path of the file to load from and save to. Loads metrics from disk. Last time the file was written. Metrics, or null if the file doesn't exist or there was an error reading it. Saves metrics to disk. If called less than after the last save, does nothing. Metrics to save. Saves metrics to disk. Metrics to save. Attribute used to indicate that exceptions thrown by a method (or all methods of a class) are not loggable. Suppresses usage errors thrown by static code analyzers. Used to log uncaught exceptions raised from an invoked method or running coroutine within the SDK. Exceptions implementing will not be logged. See go/musk-uncaught-exceptions for more information. Unhandled exception that has already been processed by . will rethrow any caught exceptions of this type. Constructor. The processed exception. Comparer for , which does not override `Equals`. The number of frames from the stack trace to log (top-to-bottom). The names of non-user assemblies. Methods inside these assembly are considered non-user methods, and can be logged without issues concerning storing PII data. The namespaces that will be logged when an exception is thrown from a method within it. Note that that the method must also be in an assembly specified in . The namespaces that will not be logged when an exception is thrown from a method within it. Constructor. Invokes the given action. Catches, logs and rethrows any uncaught exceptions that meet the criteria in . This method intentionally does not share a name with to avoid ambiguity when using method groups (e.g. Run(MyVoidMethod) would not compile and would need to be replaced with Run(() => MyVoidMethod())). The action to invoke. Whether runs user code. If true, exceptions will not be logged. The return value of . Invokes the given function. Catches, logs and rethrows any uncaught exceptions that meet the criteria in . The action to invoke. Whether runs user code. If true, exceptions will not be logged. The return value of . Runs the given enumerator. Catches, logs, and rethrows any uncaught exceptions that meet the criteria in . The enumerator to run. Whether runs user code. If true, exceptions will not be logged. The current element. Runs the given enumerator. Catches, logs, and rethrows any uncaught exceptions that meet the criteria in . The enumerator to run. The current element. Returns the given enumerable. Catches, logs, and rethrows any uncaught exceptions that meet the criteria in . The enumerable to return. The enumerable (with additional exception handling). Logs an uncaught exception if returns true for it. The uncaught exception. True if the exception was logged. Collects useful data from the given exception and logs it using . The exception to log. Builds a limited stack trace from an exception for . The stack trace of the exception. Returns true if exception should be logged. An exception should be logged if it was thrown as a result of the SDK and does not implement . The exception to check. True if the exception should be logged. Returns true if the given assembly is a user assembly. A user assembly is not referenced by the SDK. The assembly to test. True if the given assembly is a user assembly. Returns true if the given method is a user method. All user methods exist outside the SDK and inside an unknown assembly. The method to check. True if the method is a user method. Returns true if the given namespace can be logged. The namespace to test. True if the namespace can be logged. Contains data extracted from an exception. Contains information about the namespace an exception occurred in. The namespace the exception occurred in. This is found by traversing the call stack top-to-bottom until a method within a valid assembly is found. Example: (valid assemblies = [Google.Maps,]) 3 A: Calls B [UserAssembly] 2 B: Calls C [Google.Maps] 1 C: Calls D [Google.Maps.Terrain] 0 D: Throws exception [System] In this case, would be Google.Maps.Terrain. Whether was extracted from the most recent method in the call stack. If false, was extracted from an earlier method in the call stack. Constructor. The name of the exception. The namespace the exception occurred in. A limited stack trace of the exception, containing the method names of the last n frames. The first element is the name of the most recent method (i.e. the method at the top of the call stack). Method names belonging to user methods must be (and are) obfuscated to protect PII data. Constructor. Stores sent log requests locally for inspection in tests. The list of log requests that were sent. A fake LogsService for use in testing. Fake request logger that can be used for testing. Stats can be read out from the public properties. Number of times was called. Number of times was called. List of time spans passed to . Base interface for a metrics logger. Interface for a class that sends log requests somewhere for further analysis. Sends a log request as a coroutine. The log request may be sent over the network to Clearcut in the background, or stored locally for inspection. Interface for LogsServices. Coroutine for sending log messages. Stops sending logs. Logs metrics associated with instantaneous frame-rate performance. The duration of a single frame, in milliseconds. The number of GameObjects alive Logs the time taken waiting on the network for a tile to load. The time in milliseconds waiting on the network. Logs that a tile was loaded from the network or local cache. Whether the tile was loaded from the network. Logs that a network failure occurred when loading a tile. Logs information about feature usage that is detected at load time. The options for terrain rendering. May be null if terrain is not enabled. The zoom level the features are being loaded at. Whether political/administrative boundaries are enabled. Whether client-side road lattice generation is enabled. Whether client-side intersection generation is enabled. Logs information about the usage of mixed zoom. The foreground zoom level specified. The foreground distance. The falloff distance. Logs metrics associated with usage of the path finding feature. How long the invocation took, in milliseconds. The number of nodes in the returned path, or 0 if no path was found. Logs metrics associated with usage of the snap to node feature. How long the invocation took, in milliseconds. Logs that a fencing rule was registered. Logs that a fencing rule was unregistered. Logs that a call to load a map has occurred. Logs that the map has finished loading. Logs that a GameObject was created. Logs the counts of event listeners attached to the events. Events. Logs information about a call related to building a region to load. The type of call that was made. Logs information about an uncaught exception that was thrown within the SDK. Information about the exception that was thrown. Interface for logging information about tile loading -- how long it takes to load tiles, cache hit information, etc. Logs that a tile request was successfully made to the server. The time it took for the request to complete. Logs that a tile was successfully loaded from disk. Logs that a network request for a tile failed. Manages metrics logging. ID of the currently running coroutine, or 0 if there's no running coroutine. ID of the last run coroutine, or 0 if no coroutines have been run yet. Time to wait between sending logs. We choose a per-player random offset within this interval and store it in (see ). For example, a player with an offset of 3 minutes would send logs at :03, :18, :33 and :48 every hour (if the is active at that time). This meets the requirements to (a) send logs no more frequently than every 15 minutes; (b) smear logs over time, i.e. don't send from every device in the world at the same time on the 15 minute mark; and (c) send some logs even if game sessions are less than 15 minutes long. Key for storing the logging window offset seed in . Note that we store the seed used to calculate the offset, not the offset itself. This has the (minor) advantage that could change and existing seeds would still work. UTC time which the next logs should be sent. Stores the logged metrics information. Used to maintain a temporal ordering of the logged events. For persisting logs to disk. For measuring the time between the first call to load() and the first GameObject appearing. Stopwatch is stopped once we log the loading time, so it only fires once. For measuring the time between the first load() and the first time loading is complete. Stopwatch is stopped once we log the loading time, so it only fires once. Times intervals between calls to load an area of the map. Injectable clock used for timestamps and request intervals. The singleton instance of the LogsService. The file path to use for saving logs to disk. Should only be used for testing. Sender to be used for sending the log requests. Gets the singleton instance of the LogsService. Sets the singleton instance of the LogsService. Used to stub out the real LogsService for testing. The logs service to use. Sets the file path to be used for saving logs. Should only be used for testing. The path to use. Gets the file path to be used for saving logs to disk. Constructor. Creates a new proto with boilerplate fields pre-filled. Creates a new filled . The to include. Creates a new filled . Describes the type of event being logged using one of the possible s. An identifier that groups LogEvents into consecutive flows of events. LogEvents with the same flow id will be grouped into the same event flow. Whether the event being logged was prompted by a user. The logged SDK metrics to report in this . Returns the time since the device was booted in milliseconds. Returns the Unix epoch time in milliseconds. The time to calculate the Unix epoch time for. Calculates the next time that logs should be sent. The time between logging events is specified by , with a persistent offset based on userId so that each user sends at a different time during that window. Current UTC time. Seed used to calculate the time offset within the window. Gets the currently stored logging proto. Detects process foreground crashes on mobile platforms. Default instance of this class. Event that is triggered whenever a crash is detected. Filename for dirty file. Contains UUID for uniqueness. Set to true when the dirty file has been checked on startup. instance. instance. Constructor. instance to provide file operations. instance to provide the currently executing Unity platform. Returns true if application is running on supported platform. Gets the path to the dirty file. The path to the dirty file. Should be called when process has just started. Should be called when application is paused. Should be called when application is unpaused. Request sender implementation that sends log requests to the production Clearcut endpoint. Exponential backoff is used if the request fails. We'll keep trying to send the request forever, capping the exponential backoff at 15 minutes. The endpoint for the Clearcut HTTP API. Initial retry interval for exponential backoff. Chosen arbitrarily. Maximum retry interval for logs request. Set to 15 minutes, because that's how often we'd like to upload logs. Maximum number of retries. A helper class that removes the dependency on Unity runtime for frame timing information, and the dependency on static . Time between frame time samples. Random variance range for frame time sample period, from 0 to this value. This value provides a bit of jitter to our frame rate sampling timing to avoid potential issues arising from sampling at precisely the same interval every time. Delegate that logs a frame time value. Delegate function that returns a frame time in seconds. Delegate function that returns a count of GameObjects. Frame time logger. Frame time fetcher. The GameObject count delegate. Constructor. Frame time fetching delegate. GameObject counter delegate. Frame time logging delegate. Periodically log most recent frame elapsed time. A that periodically logs the most recent frame elapsed time. Delegate function to log a frame time value. Frame time in milliseconds. The number of GameObjects alive at the time of sampling. Delegate function to return the most recent frame time. Most recent frame time in seconds. Encapsulates a region of the map to load. The method creates an instance of the `%MapLoadRegion` class to load tiles for the MapsService. The following code example loads the region of the map that is visible in the main camera's viewport.
            
            MapsService.MakeMapLoadRegion().AddViewport(Camera.main).Load(options);
            
            
Interface for shapes on the map that will be loaded. One object generally corresponds to a single call to AddViewport / AddCircle etc. The union of all the shapes will be loaded. Returns a new formed by adding the to the provided grid. Grid to modify or update. Coordinate system. Zoom level (Coords.Zoom is ignored and this is used instead). Updated Grid. Determines whether a tileCoord overlaps or is entirely contained in this shape. Cases where tileCoord overlaps at the edges will return true. Tile Coordinates. Coordinate system. True if tileCoord overlaps or is entirely contained in this shape. Represents a single shape on the map that will be loaded. The the shape will encompass. This is the area of the map the shape will load when a Load method is called. A predicate which is applied to all the s collected in , to determine which tiles contained within the shape should be loaded. Constructor. The the shape will encompass. This is the area of the map the shape will load when is called. A predicate which is applied to all the tile coords collected in , to determine which tiles contained within the shape should be loaded. If null, match all tiles. Grows the grid in every direction by at least the given distance. Distance to expand, in world coordinates, in Unity world space. Constructor. Distance to expand, in Unity world space. Represents the region's grid. Rectangular grid starting at (, ) that indicates which tiles are included in this region. Minimum X tile coordinate of the region. Minimum Y tile coordinate of the region. Constructor. 2D array indicating which tiles are included in this region. Minimum X coordinate of the region. Minimum Y coordinate of the region. Constructor. Provides a instance to use when loading this region. Fresh options are fetched from this provider each time the region is loaded. This value will be passed to the TileManager load and unload methods to indicate that inter-tile dependencies should be considered, e.g., when Terrain is enabled dependency maintenance is required for correct Terrain texture painting. Tile loader to call via . Coordinate system. Tiles are loaded in order of their distance to this point in world space. Ground height, used to determine the ground plane to intersect with shapes. Points of the viewport used to calculate bounds via . List of tile coordinates in the region. This is reused to reduce GC churn. List containing s that are created when the user adds to the loadable region of the map. Events. Constructor. to obtain the current from. Tile loader. Events. Coordinate system. If true, tile dependencies will be loaded by the Load method, and UnloadOutside will not unload dependencies of the tiles within this region. Clears the contents of this region. Return the instance provided by or, if none is returned, the one passed into this method as a parameter. The to use if doesn't provide one. Loads the portion of the map defined by this region at the zoom level specified by the . Game object options. Ignored if a component is attached to the same as the relevant . Loads the portion of the map defined by this region, at the specified zoom level. Game object options. Ignored if a component is attached to the same as the relevant . The magnification level. The range is 0-21. If no zoom level is supplied, the one from *Coords.Zoom* will be used instead. Caution: Zoom level controls the level of detail of map data, and determines the size of the map "tiles" returned. The higher the zoom level, the more detail is returned, which negatively affects performance. The default zoom level is *17*. This zoom level is considered appropriate for location-based games because lower zoom levels tend to miss some important map features. Zoom level 17 is also more stable, which means the returned map features are less likely to change over time. Loads the portion of the map defined by this region, with adaptive zoom. This loads at zoom level up to a distance of world space units from the . After that, it reduces the zoom level by 1 in bands that double in size, starting with . See for details. Game object options. Mixed zoom options. Activates the loaded tiles that best cover the current region with the given mixed zoom options. Deactivates the rest. Mixed zoom options. Unloads the map outside this region. Unloads the map outside this region, at the specified zoom level. The zoom level. Zoom levels ranges from 0-21. Only tiles at this zoom level are unloaded. Adds rectangular bounds to the map region. The bounds that define the region. Adds a circular area to the map region. The center of the circle. The radius of the circle. Adds a spherical area to the map region. The portion of the map that is loaded is the intersection between the sphere and the ground plane. The center of the sphere. The radius of the sphere. Sets the point in world space where tiles should load first. The SDK loads tiles in an order that corresponds to their distance from this point. The tiles that are closest to this point are loaded first, and then more distant tiles are loaded. The point in world space where tiles should load first. You can set this to null, which results in the default unordered tile loading behaviour. Sets the height of the ground plane. This changes how the region is projected onto the area of the map to load - for example, it changes the plane that the camera frustum is projected onto for . It does not change the position of loaded map features. Y position of the ground plane. Adds an area to the map region based on the camera's view frustum. Overrides . The loaded area of the map is limited by the camera's far clip plane. If this loads too much, especially at shallow camera angles, then it can be limited further by `maxDistance`. It also loads the Camera to access the camera data in the scene. `camera` is used to sort the tiles based on their distance from the camera before loading so that tiles that are closest to the camera load first. Note: Calling this method multiple times with different cameras simply sorts the tiles by distance from the last `camera`. The camera used to limit the area of the map loaded. It is also used to determine which tiles to load first. The maximum distance from the camera position to load. Adds an area to the map region based on the camera's view frustum and given transform. Overrides . The loaded area of the map is limited by the camera's far clip plane. If this loads too much, especially at shallow camera angles, then it can be limited further by `maxDistance`. It also loads the Camera to access the camera data in the scene. `camera` is used to sort the tiles based on their distance from the camera before loading so that tiles that are closest to the camera load first. Note: Calling this method multiple times with different cameras simply sorts the tiles by distance from the last `camera`. The camera used to limit the area of the map loaded. It is also used to determine which tiles to load first. The used to transform the area of the map region to be loaded. This is usually the of the corresponding component to ensure that the right amount of geometry is loaded to fill the viewport whenever it is rotated or scaled. The maximum distance from the camera position to load. Grows the region in every direction by at least the given distance. The distance to expand by. Projects a viewport point onto the ground plane, or the far clip plane if it is closer. Camera. Ground plane. Far clip plane of the camera. Maximum distance. Viewport point to project. Boolean predicate used to decide whether to add tile coordinates to the map region. Tile coordinates. Enumerates all the s contained in this region. Sort the tiles based on their distance from the camera before returning the list if a camera has been assigned, otherwise it will not sort the list before returning. Rectangular grid starting at (, ) that indicates which tiles are included in this region. Zoom level of the s to be created. Checks whether tileCoord is contained inside this region. Tile coordinates. True if tileCoord is contained in Shapes. Generates all the s contained in this region. Mixed zoom options. Determines which zoom level tileCoord should be loaded in this region recursively. If tileCoord is in this region and its zoom level is greater than or equal to the appropriate zoom level returned by GetZoom, tileCoord will be loaded. Otherwise, recurse on each of tileCoord's child tiles - which is tileCoord's four corresponding s of the next incrementing zoom level. Tile Coordinates. Mixed zoom options. Gets the appropriate zoom level for a distance value with the given mixed-zoom options. The distance in Unity Worldspace units that will be mapped to a zoom level. Mixed zoom options. Comparison method for comparing two s by distance from . First . Second . Integer indicating the sort order. Options for edit-time map preview. Enable preview of map at edit time. Has the object been fully initialized? Used to suppress warning dialog during testing. A copy of . Used to detect when has been changed. Should be disregarded until is set. Location in the world at which to show preview. Size of preview in meters. Used to display a dialog in edit mode. Display a warning about the dangers of enabling edit-time preview. Check whether edit-time preview supports the running version of Unity. True if edit-time preview supports the running version of Unity, false otherwise. Passed down from .. Wrapper around a that exposes only the fields that could change at runtime. Pass this around internally wherever something needs to get the current value of a field that could be changed by client code. . Constructor. Maps service. Options controlling the addition of metadata to game objects generated by Musk. Which method should be used to attach metadata to game objects? Don't attach any metadata to game objects. Attach metadata in the form of Unity components (slow). Use a metadata register. Method to use to attach metadata to game objects. Metadata register to use when is selected. The entry point for using Playable Locations. Reason for reporting a bad playable location. Reason not included in the following list. Clients must provide reasonDetails with more information. Location is not accessible to pedestrians. For example, location is in the middle of a highway. Location is not open to everyone. For example, a private office building. Location is permanently closed. For example the shop at that location has been shut down. Request headers specifying the post data content type, and app identifiers on mobile platforms. Part of Unity's MonoBehaviour lifecycle. Submits a bad place report to the server. After the request finishes, the ReportBadPointStatus parameter of the callback is populated with information about whether the request succeeded. Internally, the network requests are retried multiple times in case of failures. Note:`reasonDetails` must be non-empty. The ID of the place to report. The primary reason why this is a bad place for gameplay. Freeform text explaining why the user reported this place. The callback to call when the request completes. Reports that a game object placed at this playable location was presented to the user. %Google uses the information logged in `ReportPresentedPlace` and `ReportInteractedPlace` to improve the quality of playable locations. This is done by comparing how often game objects placed at different playable locations are visited by players. Because different game object types (for example, monster and powerup) are expected to be visited with different frequencies, you must assign a `gameObjectType` to each playable location (for example: monster=0, powerup=1). This is used to bucket reports into comparable events. There should be only a small number of unique game object types—ideally no more than 10. You can call this method repeatedly with the same Place IDs. The SDK only reports places to the server if they haven't been reported before, or if the player interacted with the game object placed at the playable location since the last report. Note: You are free to define what presented means, as long as you use that definition consistently. One possibility is to report all playable locations the lie within 500 meters of the player. The type of game object placed at this playable location. The place identifier. Reports that the user interacted with the game object placed at this playable location. For more information about `gameObjectType`, see ReportPresentedPlace(). The type of game object placed at this playable location. The place identifier. Encapsulates the status of the completed request for submitting a bad place report. Indicates whether the request failed. Contains details about the error when the request fails. The ReportBadPointStatus class constructor. The %MapsService class serves as the entry point for interacting with the %Maps %Unity SDK. The SDK instantiates this class as a %Unity script component called %Maps Service (Script). You use it in a %Unity scene by adding the %Maps Service (Script) component to an empty in your scene. This GameObject becomes your anchor—and the map feature GameObjects that the SDK generates are added as its children. You can configure options using the Inspector, but you cannot change most options after calling (for example, you cannot change the ). However, you can create multiple %MapsService instances, each with different properties. For example, you could add a bird's-eye mini-map with a different zoom level to your main map. The domain address of the Semantic Tile API. If you modify this field after calling , then your change won't take effect. When true, uses http instead of https when sending requests to the Semantic Tile API. The version of the Maps SDK for Unity. The API key. You must have both the Semantic Tile API and the Playable Locations API enabled. For more information, see Get API Key. Note: If you modify this field after calling , it has no effect. Maximum number of concurrent connections to the Semantic Tile API. If you use a value less than 100, then you should expect longer load times for map data. Warning: This field is experimental. Its value might change in a future release. The maximum length of time (in seconds) to wait for a response after requesting map data. When you set this value to 0, there is no limit to the wait time. Note: This attribute is an integer rather than a floating point due to a limitation of the UnityWebRequest object. Specifies whether to send diagnostic information to Google. An example of diagnostic information is frame rate. Caution: You must set this value before the %Unity runtime calls . A backing field for . The backing field appears in the %Unity Inspector (due to ) while keeping the public property readonly. A container for all of the events fired by the SDK. Events are part of the mechanism that allows you to style map feature GameObjects. For example, the SDK fires `WillCreate` and `DidCreate` events when it generates objects and their corresponding during map loading. These events contain geometry information and metadata that you can use to style the GameObject. Specifies whether to enable features. When set to false, features are used instead, which results in reduced network traffic, CPU usage, and memory usage. If you modify this field after is called, then your change won't take effect. Specifies whether loaded map will include roads () that are marked private. A road may be marked private because it has signage discouraging or prohibiting use by the general public (e.g., roads with signs that say "Private", or "No trespassing.") or if it is within a gated community or other private area. Care should be taken when enabling private roads in localities where encouraging gameplay around these roads is discouraged by local expectations. Specifies whether the loaded map will include terrain data. Terrain data describes continuous properties that cover the entire landscape, such as elevation. Note: Terrain elevation is only available for zoom levels 8 and beyond. If elevation is requested for levels out of this range, a flat terrain with a uniform altitude of zero meters above mean sea level will be returned. The maximum length of time (in milliseconds) per frame to use for creating GameObjects. Setting this to 0 defaults to 40ms. This field can be modified at any time to change the current rate of creating GameObjects. Specifies whether to enable static batching for all generated GameObjects. When enabled, GameObjects are statically batched, unless otherwise specified in the corresponding `WillCreate` event. If you modify this field after calling , then your change won't take effect. Options for configuring Terrain. Specifies whether to enable the display of extra geometry at road intersections. Applicable only when is true. This will add a slight map loading overhead and small increase in number of triangles rendered per frame. Specifies whether to enable extra, expensive searching for road intersections. This flag can be used to find road intersections that have been optimized out of the source data. Specifies whether to build and maintain a road lattice from the roads in the currently loaded portion of the map. Enabling this will add overhead to each load of a non-cached map region. Options for edit-time preview of map. Options controlling how and if metadata is attached to game objects. If you modify this field after is called, then previously-created objects won't be updated to reflect the new options. The map zoom (magnification) level. Controls the level of detail of map data (the set of feature types returned, their density, and geometry simplification). This determines the size of the requested map tiles. The default zoom level is 17—which is considered appropriate for location-based games because lower zoom levels can miss important features such as buildings. Zoom level 17 is also considered more stable, meaning the set of features returned is less likely to change. If you modify this field after is called, then your change won't take effect. Backing field for . The backing field appears in the %Unity Inspector (due to ) whilst keeping the public property readonly. A container of parameters used for caching map data. If you modify this field after is called, then your change won't take effect. Country code provider. The BCP-47 language code corresponding to the language that Map content should be localized with (for example "en-US" or "sr-Latn"). More details about the BCP-47 language code can be found at http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If not specified the current SystemLanguage will be used. Warning: Specifying a language other than the current System language is not recommended, as text labels on the map will be shown in a language potentially unfamiliar to the user, and potentially in a character set they cannot read. Use with caution. The game world coordinate system. Manages the floating origin, Mercator scale, and converts between %Unity Worldspace (), Earth-scale Mercator Space (), and %Google %Maps Tile Coordinates (). Note: You must set the floating origin before using the coordinate system. Thrown when you use the coordinate system before setting the floating origin. Tracks destroyed and suppressed GameObjects. It notifies the SDK whenever a is destroyed so that it can then be recreated properly on subsequent calls to . Register for finalizers. The minimum rendering sort order to use for basemap objects generated by . manages on game objects generated by the SDK in order to achieve the correct rendering order for features. The maximum sorting order to use for basemap objects generated by . manages on game objects generated by the SDK in order to achieve the correct rendering order for features. All game objects that should display above the basemap should have a sorting order greater than this value. The sorting order to use for non-basemap objects generated by . manages on game objects generated by the SDK to achieve the correct rendering order for features. Schedules the creating and destruction of GameObjects. Tile manager. Tile producer that asynchronously loads feature tiles from the Semantic Tile API. Tile producer that asynchronously loads terrain tiles, if is true. Cache for feature tiles. Cache misses fall through to . Cache for terrain tiles. Dynamic interface to UnityEditor assembly. Used for queueing player loop updates for edit-time preview. The for this . Global road lattice for this MapsService. Maintains a graph of roads in loaded tiles, stitched across tile boundaries. The road lattice is in Unity World Space relative to the origin of the GameObject to which this Maps Service is attached, so the RoadLattice must be updated when the floating origin is updated. Region of the map to load, returned by . This is reused to reduce GC churn. True if should retry startup. Crash detector. Force preview to refresh. Refresh edit-time preview when any of the top-level settings are changed. The render order manager to pass down to the game object factories. Part of Unity's MonoBehaviour lifecycle. Get the game object options (including style settings) that have been attached to this . The attached game object options. Gets the bounds covered by the edit-time preview. Works in play mode. The bounds covered by the edit-time preview. Disable edit-time preview. Enable edit-time preview. Returns *true* if edit-time preview is active, *false* otherwise. If edit-time preview is active then try to load the map with the most up-to-date options. Map must be unloaded first. Load the map with the most up-to-date options. Map must be unloaded first. Refresh the edit-time preview. Map unload is triggered, and a handler to load the map is registered that will be called on unload completion. Specifies whether to enable verbose logging. Enables/disables logging verbose debug information to the %Unity console. Note: This feature is available only in debug builds. Specifies whether to enable or disable verbose logging. Loads a rectangular region (bounds) of the map. GameObjects are asynchronously created for all map features within the bounds that you specify. Note: You must set the origin to before calling this method. Calling this function is equivalent to calling `LoadMapRegion().Bounds(bounds).Load(options)`. Defines a rectangular region. User defined options which customise map construction. Thrown when the floating origin isn't set. Initializes a object to load a region of the map. GameObjects are asynchronously created for all map features within the bounds that you specify. You must set the floating origin to before calling this method. The MapLoadRegion returned by this method is cleared and reused between calls to avoid unnecessary garbage collection. The following example loads the region of the map visible in the main camera's viewport.
            
            MapsService.MakeMapLoadRegion().AddViewport(Camera.main).Load(options);
            
            
Unloads parts of the map that have not been loaded or displayed recently. Anything that hasn't been used in at least this long will be destroyed. Sets the initial origin of the coordinate system. When converting values to and from %Unity Worldspace, values are translated relative to the current origin. The initial origin value is used to determine the %Unity Worldspace scale for the entire gaming session. Mercator scale is based on the latitude, per the Web Mercator projection. The recommended `floatingOrigin` value to use is the player's starting location. It should be near the player's current location to ensure that %Unity Worldspace values remain small to avoid single precision floating point errors. The initial origin value. Thrown when the origin has already been set. Re-establishes the origin based on a new value. You should re-establish the origin whenever the user moves far enough away from the origin that floating errors become noticeable. This method translates all map feature s created by the SDK. You can pass in additional GameObjects to be translated. You can also use the returned offset value to manually translate additional GameObjects yourself. This method is an overload of the method . See Also: . The new origin value. Additional s to be translated (if there are any). A offset that you can use for manually translating s to reposition them relative to the new origin. Thrown when the origin has not been set. The following code snippet re-establishes the origin to London. Two camera objects are also moved, to keep all GameObjects in the same position relative to the camera.
            
            MapsService.MoveFloatingOrigin(
            new LatLng(51.5081, -0.0760),
            new GameObject[] {camera1, camera2});
            
            
Reestablishes the origin based based on a new [Vector3](https://docs.unity3d.com/ScriptReference/Vector3.html) value. This method is an overload of the method . The new origin as a `Vector3` value. Additional s to be moved (if there are any). A offset value, for manually moving s. Thrown when the floating origin has not been set. Resolves which API key to use. The API Key to use. Finds the component. Determines the base path for cached tiles based on . Handle Unity's Update event. Verifies that the given initialization parameters for a are valid. The API key. The zoom level. Thrown if a parameter is invalid. Constructor. Initialize main mapping classes. Handle mobile application being paused. Handle mobile application being unpaused. Handle mobile application quitting. Handle component startup. Handle component shutdown. Enable the instance. Disable the instance. Handle object destruction. A callback that takes a `ReportBadPointStatus` object. Encapsulates terrain parameters. Specifies the target resolution of each generated Unity Terrain tiles in meters per point. The actual resolution of each terrain tile may differ from the provided value. Unity tiles have square height maps with their resolution as a power of 2 + 1. The Maps Unity SDK rounds the provided value to the nearest power of 2 + 1 to meet this requirement. When used with Mixed Zoom, this value is automatically doubled for each increment zoom level is lowered. The vertical precision of terrain altitudes in meters. Possible values: between 0.01 (cm level precision) and 10000 (10-kilometer level precision). Responsible for procedurally painting a tile based on rules provided by the user. responsible for capturing features to then paint them onto terrain later. to attach to. %Events related to Terrain. Constructor. Clean up any resources created by this class. Coroutine to paint a object. The object to paint. The TerrainTile for the tile being painted. Contains the TileCoord. The style to apply to the . Finalizer that will be called when tile is finished loading or is aborted. Reveal any hidden objects on the tile indicated by the supplied coordinate, and all tiles on which it depends for terrain texture rendering (currently all neighbours) It is possible for GameObjects on the tile or its dependencies to be disabled before reaching this point if the tile leaves the camera view (e.g. when panning very quickly), leaving the terrain in an incomplete state when painted. Coordinates of the tile. List onto which to add GameObjects whose visibility has been changed. Coroutine to paint a object. The object to paint. The group mask used to draw s onto the . Finalizer that will be called when tile is finished loading or is aborted. Generates a group mask. This is then used to draw s onto the . The worldspace position of the tile to capture. The size of the tile to capture. The Unity rendering layer to use when capturing textures. The texture to be rendered into. Stores terrain information for a particular map tile. The coordinates of the tile. A 2D grid of uniformly spaced points containing elevation data. Each point within the grid represents the altitude in meters above average sea level at that location within the tile. The grid is oriented south-west to north-east, as illustrated: rows[y, 0] rows[y, x] +-----------------+ | | | N | | | | | | | | W ---+--- E | | | | | | | | S | | | +-----------------+ rows[0, 0] rows[0, x] The size in meters of the . The location of this terrain tile in world space. Floating origin. Constructor. Tile coordinate. The size of this elevation grid in meters. This value must be greater than zero. A 2D grid of uniformly spaced points containing elevation data. Each point within the grid represents the altitude in meters above average sea level at that location within the tile. The grid is oriented south-west to north-east. The grid must be non-null, and each dimension must be larger than zero. Floating origin. If any provided arguments are invalid. Translates the origin of the s object. The amount by which to translate the terrain. Encapsulates immutable styling information used to control the appearance of generated Terrain. The %TerrainStyle builder. The target resolution of the alpha map in meters per pixel, used to draw masks. The actual resolution of the alpha maps may differ from the provided value. Unity tiles must have square alpha maps with a power of two resolution. The Maps Unity SDK will round the provided value to the nearest power of two to meet this requirement. When used with Mixed Zoom, this value is automatically doubled for each increment the zoom level is lowered. The target resolution in meters per pixel of the composite texture used on the terrain when viewed from a distance greater than the Basemap distance. The actual resolution of the base map may differ from the provided value. Unity tiles must have square base maps with a power of two resolution. The Maps Unity SDK will round the provided value to the nearest power of two to meet this requirement. When used with Mixed Zoom, this value is automatically doubled for each increment the zoom level is lowered. The maximum distance at which terrain textures will be displayed at full resolution. Beyond this distance, a lower resolution composite map will be used for efficiency. The s applied to each tile during styling. The rendering layer used to capture Feature Groups for Terrain Painting. Defaults to layer 10. To prevent feature group rendering from being visible in-game, please exclude this layer from the culling masks of any other cameras in the scene. The %Builder class default constructor. A %Builder copy constructor that shallow-copies style values into the builder. Use this copy constructor when you want to create a new style object based on an existing . A Style object. Builds a new object from the values set on the builder. Default style. The target resolution of the alpha map in meters per pixel, used to draw masks. The actual resolution of the alpha maps may differ from the provided value. Unity tiles must have square alpha maps with a power of two resolution. The Maps Unity SDK will round the provided value to the nearest power of two to meet this requirement. When used with Mixed Zoom, this value is automatically doubled for each increment the zoom level is lowered. The target resolution in meters per pixel of the composite texture used on the terrain when viewed from a distance greater than the Basemap distance. The actual resolution of the base map may differ from the provided value. Unity tiles must have square base maps with a power of two resolution. The Maps Unity SDK will round the provided value to the nearest power of two to meet this requirement. When used with Mixed Zoom, this value is automatically doubled for each increment the zoom level is lowered. The maximum distance at which terrain textures will be displayed at full resolution. Beyond this distance, a lower resolution composite map will be used for efficiency. The s applied to each Terrain tile during styling. The rendering layer used to capture Feature Groups for Terrain Painting. Defaults to layer 10. To prevent feature group rendering from being visible in-game, please exclude this layer from the culling masks of any other cameras in the scene. Returns a new based on this style object. Square block of cached tiles, on a side. Cache entry for a single tile. Access to the serialized fields of Entry (, ) must lock on the that the Entry belongs to. When this cache entry expires. Obfuscated data for this tile, if loaded. Backing field for . Serialized data for this tile, if loaded. This field is not persisted to disk, but created on demand by deobfuscating . Tile hash provided by Factile. Used to update without downloading the whole tile if the contents haven't changed. MapTile for this tile, if it has been parsed. MapTiles are cached in-memory but not persisted to disk. XOR-obfuscates or deobfuscates serialized SVT. Temporary representation of the state of a , that can be atomically written back to the entry and to the persistent cache. Cache block. Cache block entry. Whether this has changed such that it needs to be rewritten to the persistent cache. Backing field for . Expiry time. Backing field for . Serialized data. Backing field for . Tile version ID. Parsed map tile. Constructor. Cache block. Cache block entry. Clears all data in the cache entry. Writes changes back to the cache block entry. If changes have been made to the persistable state, also write it to the persistent cache. Persistent cache. Can be null. Parameters of this cache block. Square array of cache entries. Formatter used to serialize cache blocks. The width and height of the cache block, in tiles. Serialization binder to map old type names to new ones. Mappings from old type names to new ones. Constructor. Returns a instance for serializing instances. New instance. Constructor. Creates a new transaction for an entry in this cache block. X offset of the cache block entry. Y offset of the cache block entry. Updates the floating origin of each cached tile. Coordinate system containing the new floating origin. Writes a binary serialized CacheBlock to a stream. Reads a binary serialized from a stream. Parameters for loading a cache block from disk. Parameters of the top-left tile in the block. Width of the block, in tiles. Height of the block, in tiles. Constructor. Parameters of a tile in the block. Block width. Block height. Persistent cache that writes each to a file. Path of the directory containing cache block files. Maximum total size of the cache on disk, in bytes. URL Builder used to build cache filenames. Horizon beyond which cache files will be deleted even when we don't need to free up space. Time between calls to . Work queue for doing caching work in a separate thread. Multiple instances of share a single static work queue to avoid simultaneous access to cache files. This doesn't avoid all strangeness (see b/67062539) but it at least keeps the disk cache valid. Pending results of , indexed by full file path. This is for deduping requests - the first request for a block triggers the work of loading from disk, and subsequent requests before the first request returns just add themselves to the list to be updated when it has loaded. Constructor. Path of the directory containing cache block files. Maximum total size of cached files. URL builder used to build filenames. Sets the value of all the results for the given filePath in to the given . File path. Cache block. Coroutine to call every seconds. Goes through the cache directory and deletes files older than , or over in total size. URL builder for feature tiles. Interface for classes that provide the user's country. Tests that can't depend directly on Unity should provide a fake implementation of this interface instead of subclassing . Gets the country code (in ISO 3166-1 alpha-2 format) for the user's country. Caution: When this method returns null, or an empty string, or , then the SDK makes no assumptions about the user's location. This can lead to poorly localized or missing names. Tile cache backed by persistent storage. Asynchronously saves a cache block to persistent storage. Asynchronously loads a cache block from persistent storage. When finished, sets result.Value to the loaded cache block, or null if not found. Coroutine to regularly clean up cache entries that are too old or over the size limit. Interface for decoders that deserialize tile content. Tile content type to decode into. Decodes the contents of a tile. Decode the first non-null valid content in the following order:
  1. .Content
  2. .Serialized
At least one of these should be set; if it isn't, DecodeIntoTransaction will throw an exception.
Tile parameters. Cache transaction, possibly containing cached Content and Serialized. Will be updated with newly decoded content to be written back to the cache. Serialized data from the server, or null if the server request hasn't been sent yet (because we're checking whether this tile is in the cache).
Interface for classes that can load a list of tiles. Load tiles with the given coordinates. List of tile coordinates to load. Game object options to load with. Whether loading and unloading should take into account dependencies of requested tiles. If true, immediate neighbours of all requested tiles will also be loaded. Unload tiles not contained in the given coordinates. List of tile coordinates to keep. Only tiles at this zoom level will be unloaded. If true, the region described by the coords parameter will be expanded by one tile in all directions. This is useful, e.g., to prevent tile dependencies from being unloaded before the tiles on which they depend are loaded. Choose a set of loaded GameObjects that best cover the the area and zoom level of the given list of tile coordinates, and activate them. Deactivate all other loaded GameObjects. Collection of tile coordinates, specifying the ideal set of tiles to render to represent the current viewport. Coords must be non-overlapping. Returns the coordinates of all loaded and partially loaded tiles. This includes loaded tiles which are in the process of being unloaded, but have not yet been fully unloaded. The coordinates of all loaded and partially loaded tiles. Tile Producer interface. Requests a tile with the specified parameters. On completion, updates the given with the tile contents. This is intended to be run as a coroutine so that tiles load asynchronously - see https://docs.unity3d.com/Manual/Coroutines.html. Implementations should first yield an action that loads the tile asynchronously, then process the results and update tileState when resumed. Tile parameters. Version ID of the cached tile, if available and supported for this tile type. If this is set, the parsed data may have status and no other tile data, meaning that we can keep using the cached data. Result of the coroutine. Builds URLs for fetching a particular type of tile data from the Semantic Tile API, as well as cache keys for caching that data to disk. Builds a URL to fetch a tile. Tile parameters. Version ID of the cached tile, if available. If true, use HTTP instead of HTTPS. Host name. Escaped API key. Builds a cache key for the given block. The cache key should depend on all tile parameters that were used to fetch the data via , such that changing a parameter that could affect the data will give a different cache key. The cache key should also be usable as a filename. Cache block parameters. Result of loading a tile via an coroutine. Return value. Deobfuscated response containing a tile proto. Cache TTL of the tile. Constructor. Constructor with parent. Successfully return a loaded tile. Finish with an error. The error details have already been reported through the event, so return nothing here. Returns whether the result of the coroutine was an error. Quad-tree of Mercator tile coordinates. This implements the algorithm described in go/musk-hot-swapping. There are two overlapping sets of tiles: Loaded (which we've loaded and turned into GameObjects) and Ideal (which we'd like to render given the current viewport). The goal is to find the set of Loaded tiles that best cover the area represented by the Ideal tiles. One node in the quad-tree. Tile coordinates for this node. Child nodes. The of each non-null child is a child of this node's . The child nodes are indexed in LRTB order; i.e. the children of a tile with coords (x, y, zoom) are {(2x, 2y, zoom+1), (2x+1, 2y, zoom+1), (2x, 2y+1, zoom+1), (2x+1, 2y+1, zoom+1)} in that order. Parent node. If null, this is the root node. Number representing whether this tile is loaded. 0 means not loaded; 1 means loaded; any number in between means partially loaded (note that the number doesn't reflect how much of the tile is loaded). Whether this tile is in the Ideal set. This class assumes that there is at most one Ideal tile in any path from the root to a leaf node. Proportion of this tile covered by the Ideal set, from 0 to 1. If this tile is ideal or it has an ideal ancestor, then IdealArea is 1. If this tile has ideal descendants, then IdealArea is (sum of Children.IdealArea) / 4. Weight of this node, defined as MinCoverage ^ abs(Coord.Zoom - Ideal tile zoom). Constructor. Coordinates of this node. Adds the given as a descendant of this node, adding as many intermediate nodes as necessary. This method is idempotent; adding a node that already exists does nothing, and returns the original node. A can be added as a descendant of itself (and will return this node). Descendant tile coord. Node representing the descendant. If is not a descendant of . Returns the parent of this node, creating it if necessary. Sets to false and to 0 for this node and its descendants. Sets the values of and for this node and its descendants. Whether this is a descendant of the ideal tile in this branch of the tree. Calculates the best render set for a subtree, and returns its score. List of tile coordinates representing the best render set from the portion of the tree that has been traversed so far. On exit, the last entries cover the subtree corresponding to this node; if a node higher up the tree chooses a better-scoring set, it should replace the last entries. Output - the number of tile coords at the end of representing this subtree. Output - score for the last elements of as the Render set for this subtree. The minimum coverage of loaded tiles that will be preferred for the render set over full coverage one zoom level further away from the ideal. Numbers close to 1 give fewer gaps in the render set. Called "fudge factor α" in go/musk-hot-swapping. Score multiplier for partially loaded tiles. As long as this is a very small positive number, partially loaded tiles will be rendered if and only if there's nothing else to show there. Root node. This is the common ancestor of all nodes in the tree. If a node is added that is not a descendant of the root, its common ancestor with the root becomes the new root, and all the intermediate nodes are added to keep it connected. Returns a node in the tree corresponding to the given , creating it and expanding the tree to contain it if necessary. Tile coord to add. Tree node corresponding to the tile coord. Adds the given to the Loaded set, and adds it to the tree if necessary. Loaded tile coord. Adds the given to the Loaded set with reduced weight, so that it will only be part of the Render set if there's no other option. Adds it to the tree if necessary. Loaded tile coord. Adds the given to the Ideal set, and adds it to the tree if necessary. Loaded tile coord. Removes all nodes in the tree from the Loaded and Ideal sets, but leaves the structure of the tree intact. This lets us reuse the QuadTree each frame without having to allocate and then GC nodes every time. Note that Calculates the Render set of tiles. This is the set of tiles that is in the Loaded set and gives the best (by some metric) coverage of the Ideal set. List of s in the Render set. Static class containing helper functions common info for generating tile and session network information. Backing field for . Headers to add to each request. On Android, the hex-encoded SHA1 of the package's first signing certificate. Unused on other platforms. Platform Unity is running on, or null if Unity isn't available (e.g. in unit tests). Constructor. Adds HTTP request headers to identify the package for API key restrictions. Sets an HTTP request header if the given value is not null or empty. Initializes if running on Android. On other platforms, does nothing. Pool of slots for network connections. Used to limit the number of concurrent network connections. Total number of slots. Free slots. Constructor. Starting size of network pool. Try to acquire a slot from the pool. Returns immediately if no slot is available. True if a slot was successfully acquired, false otherwise. Release a slot back into the pool. Release all slots back into the pool. Requests tiles asynchronously over HTTPS via coroutines. Makes use of the Semantic Tile API's proto-over-HTTP end-point instead of gRPC. Error string sent by Semantic Tile API if the client is blacklisted. When true, sends requests to the Semantic Tile API using http instead of https. This is generally useful when sending requests to a locally running instance of the Vector Tile API server. Address to use to connect to the Semantic Tile API. URI-escaped API key with Semantic Tile API enabled. Used to construct URLs to fetch tiles. Map events. Logger for tile request stats. Pool of slots for network connections. Network timeout, in seconds. Network request factory. Typically in real code and in tests. Clock used for backoff. Random number source for backoff jitter. Request headers, populated the first time is called. Set to true when kill switch response is received. Prevents further network requests from being initiated. Constructor. Coroutine runner. Host name of the Semantic Tile API. If true, use http to make requests to the Semantic Tile API instead of https. API key with the Semantic Tile API enabled. Pool of slots for network connections. Request timeout, in seconds. URL builder. Map events. Logger for network request stats. Factory for network requests. Clock used for backoff. Performs a HTTP request using the specified URL, storing the result. The url for the HTTP request. The tile coordinates being loaded. Stores the result of the HTTP request. Returns the headers that should be used for HTTP tile requests. Parses cache TTL from the HTTP response headers. Request containing the response from Factile. Cleans up anything that could be left in an intermediate state when coroutines are cancelled. Decoder for SVT feature data. SVT's fixed pixel resolution, 1/16th of a Paint device pixel. The number of SVT units that make up one Tile width or height. The bottom altitude to set when no height data is available for an extruded structure. The top altitude to set when no height data is available for an extruded structure. Threshold under which a height is considered effectively zero. Coordinate system used to covert to worldspace coordinates. Indicates if RoadLattices will be populated for loaded tiles. If true, extra searching is performed for intersections optimized out of the source data. Constructor. Parses SVT into a FeatureTile. Converts a decoded FeatureTile proto to a MapTile. Decodes an SVT tile into the supplied . The MapTile to write decoded SVT data to. The SVT tile to decode. Coordinate system. The MapTile. Decodes a Structure as either an Extruded Structure, 2D Structure, or Modelled Structure, and adds it to the supplied MapTile. Structures may be represented as a collection of ExtrudedAreas, collections of polygons with no explicitly specified height information, or as 3D models. The SVT feature to decode. The MapTile to which to add the decoded feature. Decodes a basemap water region, and adds it to the supplied MapTile. The SVT feature to decode. The MapTile to which to add the decoded feature. Decodes a basemap land use region, and adds it to the supplied MapTile. The SVT feature to decode. The MapTile to which to add the decoded feature. Convenience function for loading area geometry for Water and Region features. Combines multiple s in feature geometry into a single object. This addresses an issue with tile data where regions may be returned with many sub polygons (e.g. 74 for a water feature covering a large portion of a tile). The SVT feature to decode. The MapTile to which to add the decoded feature. An area object representing the geometry of the decoded feature. If the feature contains no polygon geometry. Decodes a and adds it to the MapTile. The SVT feature to decode. The MapTile to add the decoded feature to. Decodes a specified feature's lines geometry as a for and features. The SVT feature to decode. The MapTile to which to add the decoded feature. If the feature contains no polyline geometry. Converts SVT feature type to Segment usage type. SVT feature type. Decodes a structure represented as a 2D outline into an extruded structure and adds it to the supplied MapTile. The SVT feature to decode. The MapTile to add the decoded feature to. Decodes a Structure represented by ExtrudedAreas, and adds it to the s as an The SVT feature to decode. The MapTile to add the decoded feature to. Decodes a Factile ModeledVolume into an The SVT feature to decode. The MapTile to add the decoded feature to. Converts from SVT feature type to Structure usage type. SVT feature type. Converts from SVT feature type to Region usage type. SVT feature type. Decodes a MapFeature Area from a . Triangle strips are reconfigured as simple outline loop polygons (see ) to allow outline procesing of areas, e.g., adding parapets. Visible for testing. The Area to decode. Tile scale. Whether any of the decoded area crosses a tile boundary. Decodes an from a Triangle Fan. The first vertex is the center of a triangle fan. The other vertices are arranged around this vertex in a fan shape. The following diagram shows a triangle fan polygon with the vertices labelled with their indices. Vertices may be in either a clockwise or counterclockwise order. (1) / \ / \ / \ (0)-----(2) / \ / / \ / / \ / (4)-----(3) Visible for testing. The triangle fan to decode. Builds an from a set of Indexed Triangles. The polygon is a set of triangles with three vertex indices per triangle. (0) (4) / \ / \ / \ / \ (1)----(2) (3)----(5) Visible for testing. Vertices. Loop breaks. Indices. Whether each edge is external or not. Builds an Area from a Triangle Strip. A strip of triangles, where each triangle uses the last edge of the previous triangle. Vertices may be in either a clockwise or counterclockwise order. (0) / \ / \ / \ (2)-----(1) / \ / / \ / / \ / (4)-----(3) The triangulation generated from the above example is [0, 2, 1, 1, 2, 3, 2, 4, 3] Visible for testing. Vertices. If set, vertices in triangle strip will be permuted to be a simple outline loop. Permutes vertices of a triangle strip representation to a simple loop representation. For example (0) (4) / \ / \ / \ / \ / \ / \ (2)-----(1) => (3)-----(0) / \ / / \ / / \ / / \ / / \ / / \ / (4)-----(3) (2)-----(1) Original triangulation topology is retained, but with updated vertex positions. E.g. Triangulation: [0, 2, 1, 1, 2, 3, 2, 4, 3] => [4, 3, 0, 0, 3, 1, 3, 2, 1] Visible for testing. The original vertices of the triangle strip The original triangulation Output for updated, reordered vertices Output for updated triangulation Constructs a triangle strip from a given list of vertex indices. A triangle strip is constructed such tha each triangle uses the last edge of the previous triangle. Vertices may be in either a clockwise or counterclockwise order. (0) / \ / \ / \ (2)-----(1) / \ / / \ / / \ / (4)-----(3) Generated from the indices list [0, 1, 2, 3, 4]. The triangulation generated from the above example is [0, 2, 1, 1, 2, 3, 2, 4, 3] Visible for testing. The list of vertex indices used in calculating the triangle strip. Converts a into a list of s. From vectortile.proto: 2D vertex used for polygons and polylines. Each vertex represents an offset from the previous one in tile coordinates. The first coordinate is offset from (0, 0). For example, the list of vertices [(1,1), (2, 2), (1, 2)] would be encoded in vertex offsets as [(1, 1), (1, 1), (-1, 0)]. Vertex offsets. Tile scale. Returns whether any of the decoded coordinates lie outside the tile boundary (assumed to be (0, 0) to (TileSize, TileSize). Converts a into an array of s. From vectortile.proto: 2D vertex used for polygons and polylines. Each vertex represents an offset from the previous one in tile coordinates. The first coordinate is offset from (0, 0). For example, the list of vertices [(1,1), (2, 2), (1, 2)] would be encoded in vertex offsets as [(1, 1), (1, 1), (-1, 0)]. The coordinates of the source tile Vertex offsets. The array of GlobalCoordinates Converts a into a list of s. From vectortile.proto: 3D vertex list used for meshes. Each entry represents an offset from the previous one in tile coordinates. The first coordinate is offset from (0, 0, 0). Vertex offsets. Tile scale. Returns true if the supplied featureType is a subtype of the feature type provided as the layerType argument. E.g, FactileFeatureType.Bank is a child of FactileFeatureType.Structure, and FactileFeatureType.Arterial is a child of FactileFeatureType.Road. Visible for testing. The child type to test. The parent type to test. Whether child type is a sub type of parent type. Decoder for tiles. Coordinate system used to covert to worldspace coordinates. Constructor. Parses serialized data into a TerrainTile. Converts a decoded proto into a . The object to decode. The request parameters used to fetch the tile. Decodes and re-samples a to a grid of altitudes in meters above mean sea level, at the target resolution. The to decode. The target number of altitude data points in both latitudinal and longitudinal directions for the decoded elevation grid. Elevation data will be re-sampled during decoding to meet this target resolution. Decodes a byte string into an array of integers. The encoding is nibble-based; the first nibble contains a sign bit, two bits of the integer, and a stop bit; subsequent nibbles contain three bits of the integer and a stop bit. Small integers can be represented in a single nibble. More details in go/enduro-fast-compact-heightmaps. The bytes to decode. The number of integers to extract from packedBytes. Decodes and re-samples a to a grid of altitudes in meters above mean sea level, at the target resolution. The to decode. Decodes and re-samples a to a grid of altitudes in meters above mean sea level, at the target resolution. The to decode. URL builder for terrain tiles. Default terrain encoding format. Rounds float meters to integer centimeters. Result returned by TileCache coroutines. Return value. Parsed tile content. Version ID from Factile. Exception, if loading the tile from cache failed. Constructor. Constructor with parent. Successfully return a loaded tile. Fail with an exception (can be null). Return a partially loaded tile with the exception that prevented it from fully loading The basic interface for TileCaches. Defined to permit mocking. The type of data being cached. Asynchronously loads the tile with the given . Translates the origin of each cached tile in response to changing the floating origin. Cache of tile content. If true, set the expiry date of all tiles to a point far in the future. This has no effect outside of the Unity editor. You should prefer using LongTileCacheTimeAttribute rather than setting this directly. Mapping from cache block parameters to entries in . The key is given by . Default TTL if Factile doesn't provide one. LRU cache of tile blocks, at most in length. When it exceeds this length, blocks are evicted from the end. Wrapped tile producer. calls for a tile that isn't in the cache fall through to this. Persistent cache. Tile logger for logging cache events. Coordinate system. Used for floating origin. Width and height of tile blocks. How many tile blocks to cache in memory. Maximum time to wait for results from before disabling it. Clock used for expiry times. Coroutine starter to start coroutines. Tile decoder. URL builder used to build cache keys. Whether to send the next network request unconditionally, even if it's cached. It is set to false after sending one request. This allows more accurate daily active user accounting. Initializes the TileCache, backed by a disk cache if options.MaxDiskBytes > 0. Coroutine runner. Clock. Loads tiles that aren't found in the cache. Tile decoder. URL builder for building cache keys. Coordinate system. Cache options. Logger for cache stats. Whether to send the first network request unconditionally. Starts as a coroutine. If is true, the cache should never be cleaned up, so don't start the coroutine. Initializes the TileCache with a custom . Coroutine starter. Loads tiles that aren't found in the cache. Tile decoder. URL builder for building cache keys. Clock. Coordinate system. Custom persistent cache. Request logger for caching stats. Whether to send the first network request unconditionally. Asynchronously loads the tile with the given . The steps to load a tile are as follows: Look for the 4x4 containing this tile in the in-memory . If it's not there, look for it in . If it's not on disk, create an empty block. Look up the for this tile. If it has expired, clear it. If the has a , return it immediately. If the has SVT, parse it to a and return it. If we get this far, fall through to .LoadTile (which will typically load from Factile over the network). If this succeeds and the response contains SVT, save it to , parse it into a MapTile, and return it. Asynchronously loads a , either from , or by parsing SVT from the persistent cache or Factile. Tile parameters. Transaction to update the persistent cache if necessary. Returns an exception if the coroutine encounters any errors. Asynchronously loads a , either from , or by parsing SVT from the persistent cache or Factile. Terrain data is loaded directly from Factile. Tile parameters. Transaction to update the persistent cache if necessary. Result of the coroutine. Finds a block in the cache by coordinates. Also moves it to the head of (i.e. makes it the Most Recently Used). If not found, it creates and returns an empty block. Parameters for the cache block. Result of the coroutine. Evicts the Least Recently Used cache entries, to bring the size down to . Translates the origin of each cached tile in response to changing the floating origin. Manages the lifecycle of a set of tiles as they're loaded from Factile or elsewhere, up to the point where they generate MapTiles. The maximum length of time in milliseconds that we'll spend creating game objects per tile per frame. We limit this time to reduce jank when we're loading tiles. All the tiles managed by this TileManager, indexed by their coordinates. All tile coordinates in and are in Tiles, as well as any idle tiles (tiles that aren't actively being loaded or unloaded right now). Tiles are only removed from this after they have been fully unloaded. Set of tiles that are currently being loaded. There should generally be no overlap between Loading and Unloading. However, if moving from one to the other, it should be added to the new set before being removed from the old (so it will briefly be in both). This avoids incorrectly triggering MapEvents.Loaded. Set of tiles that are currently being unloaded. Set of directly requested tiles. Does not contain the tile coordinates of tiles that are loaded to satisfy dependencies. The number of times that a TileState has changed to state Error since the last event. List of TileStates that have been successfully loaded since the last event. Container for all events fired by the SDK. Feature cache. Terrain cache. Game object loader. MapsService parameters. Tile request options. Attribution. Queue that determines the order in which tiles will be loaded by . The that this instance will use to start coroutines. Injectable clock. Quad tree for multi zoom. The quad tree is reused in each frame to avoid GC churn. It will accumulate empty nodes if the map moves around a lot, which will affect performance. If this becomes a problem, we could create a new one if the proportion of leaf nodes that are empty becomes too high, or something. Initializer. Coroutine runner. Clock. Event handlers. Tile cache. Game object loader. MapsService parameters, for ObjectCreationFrameBudget. Tile request options. Attribution. Pumped every frame by . Loads a list of tiles. Coordinates of the tiles to load. The order of the list determines the priority, i.e. tile coordinates earlier in the list will be loaded first. Styling and construction options. Whether to load tile dependencies (all neighbouring tiles). Commences loading of the tile specified by the supplied tile coordinate, prioritizing the loading of this tile. TileState for the requested tile Unloads tiles not contained in the given list. Coordinates of tiles not to unload. Zoom level. If true, the region described by the coords parameter will be expanded by on tile in all directions. This is useful, e.g., to prevent tile dependencies from being unloaded before the tiles on which they depend are loaded. Retrieves a managed TileState with the given coordinates, or null if none exists. Coordinates of the tile. Retrieves a tile state with the given coordinates, or a new one if none exists yet. Coordinates of the tile. Options for creating the GameObject. The existing or new TileState. True if there was an existing tile with these coordinates. False if this call created a new TileState. Indicates that an error occurred during tile loading, by incrementing the number of errors that will be reported with the next . Also invokes if arguments are supplied. Arguments to invoke the . If null, don't invoke the event. Removes the given from the manager. The to remove. Adds or removes a tile from the set of tiles that are currently being loaded. If isLoading is false, this triggers a event, and also a event if this was the last in-progress (loading or unloading) tile. Coordinates of the tile. Whether the tile is being loaded. Adds or removes a tile from the set of tiles that are currently being unloaded. If isUnloading is false, this triggers a event if this was the last in-progress (loading or unloading) tile. Coordinates of the tile. Whether the tile is being unloaded. Triggers a event, if there is no pending work. Triggers a event, if there is no pending work. Pending work is deemed to be pending if any tile is unloading, or any directly requested tile is loading (). Returns true if any tiles are in the Unloading state, or any directly loaded tiles (as opposed to dependency satisfaction tiles) are in the loading state. Returns the tile coordinates of any directly requested tiles (as opposed to dependency satisfaction tiles) that are currently in the set. Triggers a event, if there are no more tiles loading (). Returns the collection of all s owned by this manager. Marks all tiles as dirty (i.e. incompletely loaded). Updates the floating origin of each cached tile. Calculates the number of tiles that should be loaded in parallel, based on the frame budget. Unload all tiles that have been unused since . Anything that has been unused since this time be unloaded. Called when coroutines have been shut down. Disables all the s to stop their in-progress loading or unloading work as much as possible. Called immediately after it is safe to start coroutines. Enables all the s. Set the reification state of the tile indicated by the supplied coordinates if there is an existing state for the tile. Coordinates of tile. Desired reification state. Stall processing of the tile indicated by the supplied coordinates if there is an existing state for the tile. Coordinates of tile. Unstall processing of the tile indicated by the supplied coordinates if there is an existing state for the tile. Coordinates of tile. Returns whether there is an active record in the tile processing priority queue for the supplied tile coordinate. Coordinates to check Whether an active token exists Returns whether there is a record in the tile processing priortiy queue indicating that process for the indicated tile has reached at least the supplied game object laoding state. Coordinates of the tile. Minimum reification state. If the tile has reached the supplied minimum state A special Priority Queue used for things like parsing tiles. This class is essentially a stack of FIFO blocks. The possible states a Token can be in at at given time. Indicates a token in neither active nor stalled. Indicates a token is active and thus counts toward the limit. Indicates a token is not active, but is unavailable to be made active, and that the token does not count toward the limit. Priority token. Each of these represents an entry in the queue. They are activated in the order that they occur in the , with the maximum number of active tokens limited by the parameter to the constructor. Tile processing should call (or ) to get a token; wait until is true; then do whatever processing it needs to, and then the token. Priority queue that owns this token. Coordinates of the tile that requested this token. Position of this token in . The current State of this token. Constructor. Priority queue that owns this token. Tile coordinate. Moves this token in front of the queue's priority tail. Releases this token. If it is active, the next inactive token in the queue will be activated. Move this token to a Stalled state. Stalled tokens do not count to active Token limit. Move this token out of the Stalled state, so it is available to be Activated again. Returns whether this token is currently stalled. Returns whether this token is currently active. The list of tokens given out by this queue, in priority order. Tokens are activated starting from the head of the list, but later reordering (e.g. adding new nodes before the priority tail) can mean that there are inactive tokens in front of active ones. Number of items in the queue. The most recent node in this Queue that is not part of the last region to be added. moves elements just before this node. When is called, if any tiles in that list have already been loaded and parsed, we want to prioritize GameObject creation for those tiles. However, we also want to keep them in the same order that they appear in that list. A simple stack or queue doesn't work, because the new tiles need to be FIFO amongst themselves but LIFO with respect to the rest of the list. So: - When prioritizing a tile, we move it to just before the current priority tail. This preserves the order among tiles moved since the last , but puts them ahead of all other tiles. Index into by . Number of currently allocated active tokens. Maximum total number of allocated tokens. Constructor. Maximum number of active tokens. Adds the given to the queue. A token for this tile. Adds the given to the end of the queue. A token for this tile. Internal method to add a new token for a given . Tile coordinates. If true, add before the priority tail. If false (or if is null), add at the end. Returns the token for a given tile coordinate, or null if not found. Coordinates of the tile. Removes the given token from the queue. Token to remove. Bumps up the priority of the given token, to just before the current priority tail. Token to prioritize. Sets the priority tail to the current head of the queue. Sets the size of the pool of active tokens. If this is less than the current number of active tokens, they will stay active. The queue will just not activate any more tokens until the number of active tokens falls below the pool size. Maximum number of active tokens at any one time. Activates tokens from the start of until the pool of active tokens is used up or all tokens are active. Moves a token to the state, and calls ActivateMoreTokens on the priority queue to permit another token to be activated in its place. The token to modify. Moves a token from state to the idle state, and calls ActivateMoreTokens on the priority queue to allow this, or another available token to become active. If the supplied token is not in the stalled state, this method does nothing. The token to modify. Move any existing token for the supplied tile coordinates to the state. If a token exists for the supplied coordinates, move it from the state to the state. Returns true if an active token exists for the supplied coordinates. Parameters for fetching a tile from Factile or cache. Tile coordinates. Tile request options. Constructor. Tile coordinates. Tile request options. Tile request options. Whether to request "3D building meshes" from VectorTile. When set to false, VectorTile will only return extruded areas (smaller tiles), which will result in the SDK creating s instead of s (reduced CPU/memory). Whether to request political features from the server. Whether to request private roads from the server. The language to use when localizing. The region code to use when localizing. Whether to enable terrain. The resolution for returned elevation height maps across the X and Z axes. Possible values: between 1 and 1024. This field is unused if is false. The vertical precision of terrain altitudes in meters. Possible values: between 0.01 (cm level precision) and 10000 (10-kilometer level precision). This field is unused if is false. Constructor. Whether to enable ()s. When set to false, extruded structures () will be used instead, which may result in reduced network traffic and CPU/memory usage. Whether to return political features such as prefectures, states, and localities. Whether to return private roads. Whether to enable terrain. The resolution for returned elevation height maps across the X and Y axes. Possible values: between 1 and 1024. The vertical precision of terrain altitudes in meters. Possible values: between 0.01 (cm level precision) and 10000 (10-kilometer level precision). The language to use when localizing. The region to use when localizing. Represents the current state of a tile. Coordinates of this tile. Parameters to use when fetching the tile from Factile or cache. Options to use to build a GameObject for this tile after it's parsed. If true, game objects belonging to this tile have been destroyed since the last time they were created by . True if this tile is being loaded, and has reached the point in the loading process where its GameObjects are being created. It may not be fully loaded yet. Whether this tile is currently in use. A tile is "in use" when it is first loaded, or when it is part of the Ideal or Render sets (see ). The last time this tile was used. Tile manager that manages this tile. Tile cache for loading feature tiles. This also wraps the that loads feature tiles from the network. Tile cache for loading terrain. This also wraps the that loads terrain tiles from the network. GameObjectLoader that creates GameObjects from a . The that this instance will use to start coroutines. Container for -related events fired by the SDK. Injectable clock for . State indicating progress through the tile geometry creation process. No progress has been made. All Unity geometry has been generated to the referenced tile. Reification has completed including, if enabled, Terrain tile texture painting. The attributions to provide for map tiles. Enum representing whether the tile has been (or is being) loaded or unloaded. Nothing happening. The tile starts in this state. Loading the tile. Unloading the tile. Current . Enum representing the state of processing to move the tile towards . Nothing happening. No coroutine is currently running, and the contents of the tile are in an indeterminate state. A coroutine is doing work on the tile right now. That coroutine should correspond to the current . If it doesn't, it's up to the coroutine to notice that and cancel itself, so that the tile can start a new coroutine that's doing the right thing. The tile has successfully completed the work specified by . No coroutine is currently running, and another one shouldn't be started unless changes. Current . Token that marks this tile's position in , if any. This is stored as a field so that can release it, since Unity doesn't clean up coroutines on disable. (If it did, the finally clauses in and could take care of this.) Is the TileState enabled? Initializes a new TileState. Coroutine runner. Clock. The coordinates of the tile. Options to use when fetching the tile from Factile or cache. Options to use when building the GameObject for this tile. Tile manager. Tile cache. Game object loader. events container. Attribution. Starts the process of loading the tile. Calling this is idempotent and cheap if the tile is already loading or loaded. Starts the process of unloading the tile. Calling this is idempotent and cheap if the tile is already unloading. Returns whether this tile is being unloaded. Returns whether this tile has been fully loaded, i.e. its GameObjects have been created. Coroutine that runs for the lifetime of the tile, monitors and , and runs either or as necessary. If the tile is successfully unloaded, this coroutine removes the TileState from and then stops. Coroutine that loads the tile. On completion, will be if the tile was successfully loaded. If there was an error, will be set to and to . If something else changes to a value other than while the coroutine is running, it will cancel loading and set to . Coroutine that unloads the tile. On completion, will be if the tile was successfully unloaded. If something else changes to a value other than while the coroutine is running, it will cancel unloading and set to . Marks the tile as having some of its GameObjects destroyed. The next call to will try to recreate them. Sets whether this tile is in use. Whether this tile is in use. Returns whether the tile is in use, or has been since . Cutoff time. When disabled, clean up as much as possible so that when any active coroutines are cancelled, everything is left in a stable state that can be resumed later. When enabled, start up the main coroutine. Queue of tasks to be executed in a separate thread. Container for a result intended to be yielded by a Unity coroutine until it is populated in a separate thread, e.g. by . Incremented atomically while setting . Lock guarding . The actual result. Absolute time to stop waiting for a result, or null to wait indefinitely. True if passed before this result was available. Default constructor. Constructor with timeout. Maximum amount of time to wait for this result. Returns true while still waiting for an asynchronous response. Returns false when the response is ready and available to the main Unity thread. Sets and signals that the coroutine can resume. Delegate type for work item to be done by this queue. Lock guarding . Queue of work items. Lock guarding . Number of work items remaining. This differs by one from .Count when a work item has been removed from the queue but hasn't finished executing. Constructor. Starts the work thread immediately. Adds the given work item to the queue. Main loop to be executed on a separate thread. Blocks until the work queue is empty. The tile request logger. Component for displaying map tile attribution text. The name to use for GameObjects created by this script. Reference DPI used for performing dp-to-px calculations. See https://developer.android.com/training/multiscreen/screendensities for more information. The size of the text in density-independent pixels (dp). The size of the outline around the attribution text. The alpha value to use for the text color. Overrides any user-provided values. The amount to offset the attribution text from the edges of the screen (as a percentage of the screen between 0 and 1) The active renderer. The number of references to the active . Adds a reference to the active and creates one if it does not already exist. Removes a reference to the active and removes it if no references remain. Whether the application is quitting or has been called. The canvas that this GameObject belongs to. The attribution text renderer. The canvas renderer. The attribution text outline. Settings for generating the attribution text mesh. The scene this GameObject exists in. The scale factor of . This is stored so that we can check if the scale factor of has changed without calling an internal Unity function each frame. Creates the required GameObjects for . The created . Logs an error to the console without a stack trace to hide the internal workings of this script. Get the default used to generate the text mesh. The used to render the text mesh. Returns true if the attribution text should be rendered. True if the attribution text should be rendered. Returns the current DPI of the device. If returns 0, the device DPI can't be determined and is returned as a fallback. See https://docs.unity3d.com/ScriptReference/Screen-dpi.html for more information. The current DPI of the device. Called before the first frame update. Called when the canvas hierarchy changes and when the canvas is disabled. Called when the canvas group changes; Called immediately before canvases are rendered. Ensures that the attribution text is rendered with the appropriate settings. Updates the scale factor of to ensure that UI elements contained within it maintain a constant physical size. Called when this component is destroyed or disabled. Called when the application quits. Deletes this renderer and associated GameObjects. Keeps track of providers for map tiles and generates an attribution string for them. The providers of this tile to give attribution to. Whether attribution for this tile is visible. Constructor. The providers of this tile. Called when the visible providers have changed. Returned by . Reused to reduce garbage. Keeps track of the number of loaded tiles for providers that are being rendered. Keeps track of all loaded tiles. This includes tiles that are not currently being rendered. True if attribution should be shown for map tiles. Show attribution for the given tile. The tile attribution info. Whether to update the attribution string. Show attribution for the given tile. The tile attribution info. Whether to regenerate the attribution string. Aggregates attributions of multiple . The game-wide instance of . The attribution text. Called when the visible providers have changed. Maps language codes to hardcoded translations of 'Map data ©YEAR PROVIDERS'. {0} = year placeholder; {1} = providers placeholder Used for building the attribution string. Reused to reduce garbage. Used to aggregate and sort providers from multiple objects. Reused to reduce garbage. Used for generating the attribution string. Used for getting the of the target language. Builds an attribution string from the providers of multiple objects. The target language's . The objects to aggregate. The previous attribution string. No garbage will be generated if this is equal to . Set to the attribution string built from . Whether is different to . Returns a localized attribution format string. Format parameters {0} and {1} correspond to the copyright year and provider name list respectively. If the given is not supported, it is reset to . The localized attribution format string. Constructor. Provides an instance of for the target language. Returns a new instance of . Changes made to it are reflected in . The new instance. Unregisters an instance of . The instance to unregister. Called when the visible providers have changed. Styling options for the attribution text. If an instance of this component does not exist in the scene, default settings are used instead. Sets the anchor of the attribution text. The color of the attribution text. The outline color is given by the inverse of the text color. Empty implementation of used for tests and preview mode. Interface for providing attribution for map tiles. True if attribution should be shown for map tiles. Records and shows attribution for providers of the given tile coordinate. The providers of the given tile coordinate. The tile coordinate. Forgets and removes attribution for providers of the given tile coordinate. The tile coordinate. Shows attribution for the given coordinates, and hides all others. The tile coordinates to show attribution for. Returns the visible providers. The visible providers. Register that associates finalizers with objects. Clients can register finalizers against objects and invoke all registered finalizers for the specified objects. Dictionary mapping objects to finalizers. Invoke the finalizers for the specified objects. Finalizers are unregistered after invocation. The object whose finalizers should be invoked. Invoke all registered finalizers. Finalizers are unregistered after invocation. Register a finalizer against an object. The object to register the finalizer against. The finalizer to register against the object. Applies settings to s. Apply to a . to apply to. to apply to the . Factory for creating GameObjects from s. Events to invoke during GameObject creation. Handles the static batching of all created GameObjects marked as static. Used to add metadata to game objects. Used to generate intersection meshes. Used to apply properties of s to s. Constructor. IntersectionEvents to invoke during GameObject creation. Manages the batching of GameObjects marked as static. The render order manager to use for game objects created by this factory. Register for finalizers. Metadata options. Creates a from an object. The feature used for construction. Style that supplies the road width used to build intersections. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. Root . An object that is set as the parent of the created intersection s. The road lattice of the map tile belongs to. Inserts new nodes and edges in the given road lattice corresponding to the beginning of the each intersection arm. Edges that begin at an arm and enter the intersection are flagged with . The road lattice to modify. The root node of the intersection. The arms to insert. The intersection styling. Inserts a new node and edges into the given road lattice corresponding to the beginning of the intersection arm. The edge that begins at the arm and enters the intersection is flagged with . If a new node was inserted into the road lattice for this arm, the edge flagged is one of the outgoing edges from that node. The road lattice to modify. The root intersection node. The arm node with an edge to . The length along the arm to insert an node at. Factory for creating Unity tiles from . Events to invoke during GameObject creation. The height of the terrain bounding box must be an integer multiple of this value. This causes most adjacent tiles to have the same terrain bounding box. Where adjacent tiles have significantly different bounding boxes, Unity's rounding can cause gaps between tiles even if they start matching altitudes at the boundary. GameObject manager used to record state of loaded GameObjects. This is used to stitch a generated tile with its neighbors. Used to apply properties of s to s. Constructor. to invoke during creation. GameObject manager. Creates a GameObject from the specified object. used for construction. The the belongs to. Style to apply to the generated . Parent of the generated GameObject. Generates from the specified terrain information component. used for construction of . The lower bound altitude values are normalized against. The upper bound altitude values are normalized against. Style to apply to the generated . The the belongs to. Returns a 2D array representing a normalization of the specified altitudes against the range [lowerNormalizationBound, upperNormalizationBound]. The altitudes to normalize. The lower bound of the range of values altitudes are normalized against. The upper bound of the range of values altitudes are normalized against. Schedules creation and destruction of GameObjects. Created GameObjects are parented to the GameObjectLoader's GameObject. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. When true, a global road lattice will be maintained merging individual road lattices generated for each loaded tile. Whether extra geometry will be generated to display road intersections. Whether geometry will be generated to represent terrain. GameObject factories. Events fired by the SDK. The that this instance belongs to. Will be used, for example, to start coroutines. GameObject manager. Keeps track of destroyed and suppressed s. Terrain painting manager. Handles the static batching of all created GameObjects marked as static. Road lattice manager. The coordinates of active tiles. A tile's active state corresponds to the active state of its GameObjects. When a tile is set active, its is merged into the global road lattice, and unmerged when set inactive. A loaded tile may be either active or inactive. This is set to true when is called, which is used with mixed zoom. It is used to determine whether to only load road lattices of map tiles with coordinates contained in , and to determine whether buildings should be revealed at the end of . Initializes the GameObjectLoader. The root that this instance belongs to. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. When true, geometry will be generated to display intersections. When true, a global road lattice will be maintained from loaded features. When true, geometry will be generated to display terrain. When true, game objects will be generated for Mercator tiles. Events. Game world coordinate system. The GameObjectManager. The road lattice manager. Render order manager to pass down to game object factories. Register for finalizers. Metadata options. Clean up any resources created by thie class. Paint an existing that was created for a terrain tile. that the was created for. to paint. Terrain style settings. Tile load finalizer. Create an unpainted terrain with attached including heights and connectivity. Terrain tile to create for. Terrain style settings. New for terrain tile. Calculate a positional offset and minimum base height for an extruded structure that will help it to sit better on the terrain. Terrain tile on which the extruded structure sits. Extruded structure to calculate adjustments for. Positional offset to apply to structure on creation. Minimum base height to apply to structure on creation. The base of an is the shortest extrusion at the bottom-most part of the structure. In buildings with a single extrusion, the base of the extrusion is the entire object. Calculate a positional offset for a modeled structure that will help it to sit better on the terrain. Terrain tile on which the modeled structure sits. Modeled structured to calculate offset for. Positional offset to apply to modeled structure on creation. Creates the next GameObject for the given tile, then yields. MapTile to process. TerrainTile to process. GameObjectOptions. Finalizer that will be called when tile load is finished or will be aborted. Returns true if all neighbouring tiles of the the tile referenced by coord have reached stage. Coordinates of tile for which dependencies are tested If dependencies are satisfied Whether to create a new for the given for the given tileCoord. A loaded from an uncached tile will always have a single , but if loaded from cache it may come pre-stitched, so we need to supply the that we are loading. The MapFeature to test. The coordinates of the tile from which we are loading. Whether to create a new for the given place ID for the given . A loaded from an uncached tile will always have a single , but if loaded from cache it may come pre-stitched, so we need to supply the that we are loading. The place ID to test. The coordinates of the tile from which we are loading. Interface for classes that schedule creation and destruction of GameObjects. Activates the given tiles and deactivates all other tiles. The coordinates of the tiles to activate. Creates GameObjects for all of the MapFeatures on a tile, spreading load across frames. Parents should generally be created before children, as GameObjects are destroyed in reverse order of creation. Map tile. Terrain information. Options to load with. Result of the coroutine. result.Value is null on success. Destroys all GameObjects for a tile, spreading load across frames. GameObjects are destroyed in reverse order of creation. Tile coordinate. Result of the coroutine. This is just to allow cancellation; result.Value is ignored. Interface for , for injecting fakes in tests. Add methods from to this interface as needed for tests. Sets the active state of GameObjects corresponding to the given tile. The coordinate of tile to activate. The new active state of the GameObjects. Component storing information about the map feature used to create a game object. The map feature used to create this game object. MonoBehaviour designed to be hot loaded. instance. Has the class been initialized? Mechanism for hooking assembly reload. Listeners for events. Internal constructor to prevent this class from being inherited from outside the assembly. Simulate the Unity *OnEnable* event. Simulate the Unity *OnDisable* event. Simulate the Unity *AssemblyReloadEvents.beforeAssemblyReload* event. Handle Unity's *Update* event. Trigger for all added listeners. Trigger for all added listeners. Try to start component. If throws an exception startup will be cancelled. Count of the number of assembly reload hooks registered with Unity. Used for testing of hook cleanup. Handle Unity OnEnable event. Handle Unity OnDisable event. Handle Unity OnDestroy event. Install any necessary hooks. Has no effect if hooks have already been installed. Uninstall any registered hooks. Has no effect if hooks are not installed. Try component shutdown. If throws an exception shutdown will be cancelled. Try component shutdown. If throws an exception shutdown will be cancelled. Handle Unity application pause/resume events. True if the application is pausing, false if it is resuming. Handle Unity application quit events. Override with startup logic. This is called after Unity has deserialized all the serializable attributes and before is called. Override with shutdown logic. This is called when the object is going to be disposed of, e.g. because it is being destroyed, because the assembly is about to be reloaded, etc. Finalization logic should be placed here. Override with enable logic. Override with disable logic. Override with destruction logic. This is not meant to containing finalization code, as it won't be called if the object is disabled. Finalization code should be placed into . Override with update logic. Won't run until initialization succeeds. Override with logic to be triggered when the application is paused on mobile platforms. Override with logic to be triggered when the application is unpaused on mobile platforms. Override with logic to be triggered when the application quits on mobile platforms. A representation of a road intersection that can have multiple in/outgoing roads. The intersection arms. The root node of the intersection. The neighbors of this node given by represent the roads connected to this intersection. For example, three neighbors may indicate a T-intersection. Constructs an intersection shape from the given root node. The root node of the intersection. The intersection feature created from the given node. Generates a polyline by following the edges of the road lattice. Starting from startNode, a vertex at the location of that node is appended to the polyline. The same is repeated for neighborNode and then for its unvisited neighbor and so on until an intersection (a node with more than two neighbors) is found or the maximum length is reached. These polylines represent the centrelines of entire roads, and their extrusions are used to find line intersections between outgoing roads of road intersections. The line to which to append vertices. The node to start generating vertices from. All line vertices are relative to the position of this node. The next node to generate a vertex after the start node. This node is assumed to share an edge with the start node. The maximum length of the line to be generated. If another intersection is detected while generating the line, this is set to the node of that intersection. If the line generated loops back to , this is set to the node traversed immediately before looping back. The length of the line generated. Constructor. The root node of the intersection. The arms of the intersection. Container for instances. A factory for generating Unity GameObjects from an AreaWater. A factory for generating Unity GameObjects from an ExtrudedStructure. A factory for generating Unity GameObjects from a LineWater. A factory for generating Unity GameObjects from a ModeledStructure. A factory for generating Unity GameObjects from a Region. A factory for generating Unity GameObjects from a Segment. A factory for generating unity GameObjects from an Intersection. A factory for generating Unity GameObjects for Terrain. Constructor. Events. Manages the batching of GameObjects marked as static. The render order manager to use for game objects created by this factory. Register for finalizers. Metadata options. GameObject manager. Factory for creating GameObjects from s. Generates a Unity Mesh during GameObject creation. Events to invoke during GameObject creation. Handles the static batching of all created GameObjects marked as static. Used to add metadata to game objects. Used to apply properties of s to s. Constructor. to invoke during GameObject creation. Manages the batching of GameObjects marked as static. The render order manager to use for game objects created by this factory. Register for finalizers. Metadata options. Attempts to create a Unity GameObject from the specified MapFeature and Style objects. Returns null if GameObject creation was cancelled by a WillCreate event handler, or if the Line within the provided LineWater contains invalid geometry, preventing object creation. used for construction. Style to apply to the generated GameObject. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. Root . Parent of the generated . The GameObject manager, which tracks destroyed s. If you destroy a GameObject (for example, to reclaim memory for distant objects), then you should call so the SDK will create a new GameObject the next time you load that area of the map. Similarly, you should call when you unload the entire scene. For each , a collection of s that have been loaded, represented as a mapping from place IDs to their corresponding s. Keys of the inner Dictionary are Place IDs, and s are stored in the order in which they were created. Objects will be destroyed in reverse order of creation (so that, e.g., parents can be guaranteed to be destroyed after their children). Stitched features can exist in the inner Dictionary for multiple s. Information about a that was created for a map feature. Coordinate of the tile for which this game object was created. Place ID of the feature for which this game object was created. Map from s to s. Maintains the state of the terrain objects that have been loaded. Tile manager. Used to mark tiles as dirty when objects are deleted. Register for finalizers. The number of GameObjects currently alive. Constructor. Tile manager. Register for finalizers. Whether the has recorded the loading of a feature with the supplied Place ID from a tile with the supplied Due to feature chunking a given Place ID may occur on multiple feature chunks in adjoining tiles, but each Place ID will only occur at most once on any given tile. This method tests the loaded state of a given chunk by accepting a Place ID and a TileCoord. Place ID. Tile coordinates to test. Records that a was created for the supplied PlaceId and TileCoord. The coordinate of the tile that this game object was created for. The place ID of the feature that this game object was created for. The game object that was created. Remove the mapping from tile and place ID to game object and mark the tile as dirty. Coordinate of the tile the feature belongs to. Place ID of the feature. Notifies the SDK that a was destroyed, or that a GameObject is scheduled to be destroyed at the end of the current Update loop. The SDK doesn't actually destroy the GameObject. You can do that via %Unity's API (). After you call the `DidDestroy` method, the next call to generates a new . A GameObject. Returns the collection of s created for a tile, indexed by place ID; or null if the tile is not loaded. Coordinates of the tile. Returns the that was created for a given place ID and tile coordinate, if one has been created. Otherwise, return null. The place ID. The tile coordinate. The , or null if none has been created for the given place ID and tile coordinate. Removes the entry for a given Place ID at given tile coordinates. If this is the last entry for that tile, remove that tile's collection as well. Unlike DidDestroy, this works for GameObjects that have already been destroyed. Tile coordinate to remove from. Place ID of the feature to remove. Notifies the SDK that all s in the scene were destroyed; for example, when unloading the scene. After you call the `DidDestroyAll` method, calling causes new s to be generated. Aligns the provided altitudes with that of any loaded neighboring tiles. The tile coordinate for which neighbors should be found. The grid of altitudes that need to be aligned with any loaded neighbors. The grid must be a square oriented south-west to north-east, as illustrated: rows[y, 0] rows[y, x] +-----------------+ | | | N | | | | | | | | W ---+--- E | | | | | | | | S | | | +-----------------+ rows[0, 0] rows[0, x] Adds the specified terrain information to the record of loaded terrain states. The for the loaded terrain information. The tile to record. The raw altitudes written to the terrain tile. Unloads the terrain tile for the specified , if one exists. The to remove terrain for. This uses explicit interface implementation to avoid having to make it public. It effectively gives it the same visibility as since callers need to refer to the interface. Destroy all objects created by the parent . Gets the number of GameObjects managed by this class. A map feature representing an intersection overlay object. The shape of this intersection feature. Constructor. Constructor that takes a tile coordinate, and creates a new default metadata to associate with this feature. Metadata associated with a GameObject constructed for an intersection overlay pseudo feature. Intersection feature associated with this GameObject. Represents an outgoing/incoming road from an intersection. The segment that this arm lies on. A road may be composed of multiple segments. In cases where an arm lies on multiple segments, this holds the first segment closest to the intersection center. The material to apply to the arm submesh. If this is not set, the material defined in is used by default. Whether to cancel the construction of this arm. The inverse of this arm, if it exists. Both this arm and its inverse represent the opposite direction of a road that leaves and returns to the same intersection. ___ / \ / / \ \ A\ \ / /B \ I / | |C | | In the above example, A, B and C are arms of the intersection I. A and B are arms which leave and return to I using the same path, and so are inverses of each other. The arm shape. Whether both endpoints of end at intersections. The edge that this arm starts frm. The length of . Returns true if this intersection arm is two-way with the given join length. The join length to test. True if this intersection arm is two-way with the given join length. Generates road intersection meshes from an . Z-order to use for intersections. The render order manager to use for game objects created by this factory. Register for finalizers. Constructor. Manager for sorting features. Register for finalizers. Keeps track of parameters for generating a mesh from an . The sides of an arm refers to the sides seen when facing away from the intersection, center, e.g.: L | | R | | ( C ) R \ \ L \ \ The arm mesh data. The distance along the left side of the line extrusion to start the mesh from, measured from the center of the intersection (i.e. index 0 of the left extrusion line). The length of the left side of the mesh. The distance along the right side of the line extrusion to start the mesh from, measured from the center of the intersection (i.e. index 0 of the right extrusion line). The length of the right side of the mesh. The intersection arm this mesh data is associated with. The mesh extrusion of the intersection arm's polyline. Creates a representation of an intersection arm from a polyline. The intersection arm. The width of the road The intersection arm representing the given polyline. Constructor. The intersection arm this mesh data is associated with. The mesh extrusion of the intersection arm's polyline. Builds the intersection mesh and attaches it to the given GameObject. The GameObject to build the mesh for. The intersection arm shapes. The intersection styling. Builds the intersection arm shapes used for building the intersection mesh. The intersection map feature. The intersection styling. The intersection arm shapes corresponding to the arms in the given intersection. Generates and adds the submesh of the intersection arm to the given . Intersection arms are added as individual submeshes so that different materials can be applied to each individual arm. Materials can use the UV2 coordinates to apply a decal, which may differ for each arm. The MeshBuilder to add the arm submesh to. The submesh index to use. The arm to generate a submesh of. The intersection styling. Constructs the mesh for this intersection. A submesh is generated for each intersection arm and a single submesh is generated for the inner intersection polygon, in that order. The intersection arms. The intersection styling. The mesh of the intersection. Extends the given intersection arm's polyline if it is shorter than the given minimum length and does not join two intersections. The intersection arm. The minimum length the arm's polyline should be. If the polyline is shorter, the final line segment is extended by the remaining length. Finds the furthest distance along each arm's left and right side where an intersection with another arm occurs. The arm extrusions to test. The maximum distance along each arm where an intersection can occur and be recorded. Intersections occurring further along this are ignored. The distances along each arm's left and right side where an intersection with another arm was found. Indices i*2 and i*2+1 correspond to the distances along the left and right side for arm i respectively. Returns a list of arm shapes that describe points along each arm's extruded lines. These points give the start points of each arm where, ideally, there is no longer any overlap between them. The arm extrusions to find the start points of. The intersection styling. The arm shapes. Generates the mesh covering the inner polygon area bordering the intersection arms. The mesh builder to use. The arms of the intersection. The submesh index to use. Finds the distance along two polylines where the furthest intersection between them occurs and updates the given distance values if the distance found is greater. The distance along a polyline refers to the distance measured along successive line segments, starting from index 0. The first line to test. The second line to test. The distance along line a where the furthest intersection was found. The distance along line b where the furthest intersection was found. Whether corresponds to the left side of Whether is the inverse of . If this is true, intersections between the same and neighboring line segments are ignored. The maximum distance along each line where an intersection can occur and be recorded. Intersections occurring further along this are ignored. Get the direction of the line segment (endIdx-1, endIdx) that contains the point along the given line and distance. The line. The distance along the line where the point lies. The direction of the line segment (endIdx-1, endIdx) that contains the point along the given line and distance. Returns the point t of the line L=(,t) with length and where L is perpendicular to . The use of this method is demonstrated in the the example below. ____________ / ________ \ \ \ \ \\ \ \ \__/ k o->p \______/ / / A\ \ B If we want to find p on line B from o on line A, we cannot simply use . Notice that k is also further along on line B, but is closer to o than p is and would be returned instead. Instead of finding the closest point to o, we predict where p should be using this method and get the closest point to that. The point s of the line (s,t). The direction of the line that lies on. Whether the point lies on the left line of an extrusion. The length of the line (,t). The point t of the line (,t). Adds UV2s for the side of an arm to the supplied . Example: We want to produce the following ordered UV2s for a left and right extrusion: (0, 0) | | (1, 0) Left | | Right (0, 1) v v (1, 1) Ordered UV2s: (1, 0), (1, 1), (0, 1), (0, 0) The left UV2s are added in reverse order as its vertices are added to the MeshBuilder in the same way so that they follow on from the right vertices clockwise. In this example, the right line is first passed as is, producing UVs (1,0) and (1,1) in that order. The left line will next need to be passed in reverse order, with the invertV flag set to true to ensure the v-values are inverted to produce the UVs (0,1) and (0,0) in that order. The to use. The line of an arm side to add UV2s for. The u-value to use for the UV2 coordinates. The v-value to start from for the UV2 coordinates. The v-value to end at for the UV2 coordinates. Whether the v-value for the UV2 coordinates should be inverted. 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. The half-size of the rectangle used for searching for nearby nodes at different zoom levels to merge with. Operations are performed using mercator coordinates at the zoom level defined by . Additional options provided to and . Delegate for returning the cost of traversing the edge between and while pathfinding. The source node. The destination node. Delegate for returning the neighbors of a . The node to return the neighbors of. The default used when unspecified. The function used to estimate the cost of moving from one node to another. The function used to return the neighbors of a node. Exception thrown by when a path cannot be found. Exception thrown by when no nodes can be found. For example, when the lattice is currently empty. A predicate on a used for filtering. For example, ins . The node to test. Encapsulates an immutable, directed line segment that represents a connection between nodes in this lattice. Position of the start of this segment. Position of the end of this segment. Contstuctor. The nodes in this lattice. The collection of nodes in this lattice, indexed by the integer locations of the nodes. Quadtree used for storing and retrieving boundary nodes. Lazily initialized in `MergeFrom` to avoid unnecessary overhead for road lattices that don't use it. Combines two nodes into a single node at the supplied location where the combined node will have connections to all nodes that were connected to either of the supplied nodes. The source nodes may contain non-disjoint sets of neighbors. This will not result in multiple links to/from the combined node to any given neighbor. The location of the generated, combined node. One node to combine. Another node to combine. The generated, combined node. Adds a to this lattice by iterating through the vertices of the segment, creating a at the location of each vertex, with nodes corresponding to adjoining vertices becoming neighbors. If a vertex is marked as being on a tile boundary, the created node will also be marked as being on a tile boundary. Newly created nodes are added to this lattice using the ALLOW_MERGE option, so if this lattice contains a node at the same location as a vertex from the added segment, then the newly created node (corresponding to the vertex in question) is merged into the existing node. This has the effect of generating intersections where added segments intersect at a vertex. Where two segments cross but do not both have a vertex at the crossing point, this process does not create any new nodes. The RoadLatticeSegment to add. Adds a supplied to this lattice, or merges the supplied node with any existing node at the same location. The node to add. Either the supplied node, or the node to which the supplied node was merged. Adds the supplied node to this road lattice, replacing any existing node at the same integer coordinates. The node to add. Find any node in the lattice at the supplied position. The location at which to look for nodes. Any node found at the supplied location, or null if none exists. Find any node in the lattice at the supplied location UID. See for more information. The location UID at which to look for nodes. Any node found at the supplied location UID, or null if none exists. Returns a list of objects representing all the edges in this lattice. This method is primarily intended for use in debugging methods, e.g., displaying a representation of the RoadLattice. All of the edges in this lattice. Returns a list of positions of all of the nodes of the supplied type in this lattice. This method is primarily intended for use in debugging methods, e.g., displaying a representation of the RoadLattice. List of positions of nodes of the supplied type. Deprecated. Please use instead. Returns a list of all the nodes in this lattice. The list of nodes. Returns a list of positions of all of the nodes in this lattice. This method is primarily intended for use in debugging methods, e.g. display. List of positions of nodes. Clears all nodes and connections from this lattice. Translates the origin of all s in this lattice. The amount by which to translate nodes. Merge the supplied road lattice into this The lattice to merge into this lattice. Tile coordinate of the source lattice. The , which is required for recording lattice node merges. Merge the supplied road lattice into this The lattice nodes to merge into this lattice. Tile coordinate of the source lattice. The , which is required for recording lattice node merges. Unloads each of the supplied objects if it is not currently referenced from another tile. The nodes to possibly unload. Removes the supplied from the road lattice. The node to remove. Creates a clone of this road lattice by creating an entirely new lattice with an identical structure. The generated clone is entirely independent of the original, containing new nodes that do not reference the original lattice. The clone Returns a list of RoadLatticeNodes on the (inclusive) path from start node to end node, or null if there is no path. The node that starts the path. The node that ends the path. The maximum number of search iterations. If a path is not found within this limit, then null is returned. Additional pathfinding options. If null, is used. An ordered list of nodes on the found path, or null. Finds a path between the supplied nodes, or throws a when a path cannot be found between the supplied nodes. The node that begins the path. The node that ends the path. The maximum number of search iterations. If a path is not found within this limit, then no path is returned. Additional pathfinding options. If null, is used. If a path cannot be found. An ordered list of nodes on the found path Finds the nearest node in the to the supplied position. This is a proof of concept brute force implementation. Performance is O(n), where n is lattice.GetNodes().Count. The 3D position to snap. An optional predicate used to select which nodes are available for snapping. If provided, only nodes for which this predicate returns true can be returned as the result of snapping. The nearest node to the supplied position or null if the lattice has no nodes, or no nodes pass the supplied predicate. Finds the nearest node in the to the supplied position. The 3D position to snap. An optional predicate used to select which nodes are available for snapping. If provided, only nodes for which this predicate returns true can be returned as the result of snapping. The nearest node to the supplied position, or null if the lattice has no nodes, or if no nodes pass the supplied predicate. Initializes and adds to it all boundary nodes stored . Utility functions useful for debugging RoadLattice behaviour including, e.g., generating debug GameObject representing a lattice. Make a GameObject showing connections between s and marking Nodes that lie on tile boundaries. The lattice to reify as a GameObject. The material to apply to the generated mesh. The GameObject representation of the supplied lattice. Make a number of debug meshes from the supplied list of road lattice segments, dividing the collection of segments into multiple subsets to avoid creating any meshes with an excessively large number of vertices. The parent object for created sublattice objects. Lines segments of the road lattice. The material to apply to the generated mesh. The constructed mesh. Adds tetrahedral pins to nodes on tile boundaries. The parent object for created sublattice objects. The RoadLattice. The material to apply to the generated mesh. The constructed mesh. Adds to the supplied a rectangle representing the a line segment. The mesh builder to which to add a rectangle. One end of the line segment in 2D world space. One end of the line segment in 2D world space. The width of the generated line segment rectangle. Add a vertically oriented triangle to the supplied , with the triangle standing on one vertex, i.e., pointing down. The MeshBuilder. The 2D world space position of the triangle base. The size of the generated pin. A structure representing an outbound connection to a . The source of the edge is not explicitly represented, only the destination. The target node to which this edge joins. The source map feature from which this lattice edge was generated. The possible flags for an edge. An ordinary edge. An edge entering an intersection. The flags for this edge. Constructor. The target node to which this edge joins. The source map feature for this edge. The flags that apply to this edge. Creates a duplicate version of this edge with a new target, but all other properties transferred. This method is useful, e.g., for cloning objects. New target. The duplicate. Handles the global road lattice and keeps track of all loaded and unloaded road lattices local to specific s. Used to assign extra data to a . The road lattice. The nodes cloned from that have been merged into . This set may also contain other nodes added by . Whether this road lattice is active. See for more information. An inactive road lattice should have an empty collection. Constructor. The representing the roads in the tiles loaded by this RoadLatticeManager. Events fired by the SDK. Maps the tile coordinates of map tiles to their road lattice. Constructor. The global road lattice. Events. Used to inform this that the node has been merged into the node, and that the the mapping from Tile coordinates to nodes should be updated to reflect this merge. The node onto which source was merged. The node that was merged. The tile coordinates of the source node. Sets the active state of the road lattice associated with the given tile coordinate. When a road lattice is set active, it is merged with . When it is set inactive, it is unloaded from the . The tile coordinate of the road lattice to modify. The new active state. Adds an inactive road lattice associated with the given tile coordinate. A road lattice that is inactive has not yet been merged with the . When this road lattice is set active by , it is first cloned before being merged with the global road lattice. The original road lattice, , is not modified. The tile coordinate to associate with the road lattice. The road lattice to add. Removes the road lattice associated with the given tile coordinate. If the road lattice is active, it is set inactive and demerged from the global road lattice before removal. The tile coordinate associated with the road lattice to be removed. A node in a graph representing the layout of roads in an area. Each node contains a collection of neighbor nodes. Converts the given encoded integer coordinates to a . is expected to be an encoded version of the mercator coordinates stored in a and returned by . The location UID to convert. The converted location UID. The possible types of . Indicates node with no interesting properties. Indicates a Node lying on the border of a tile. Indicates a Node that is a neighbor of a node lying on a tile boundary. Indicates whether a node corresponds to a common vertex in two or more segments, or if it was generated by discovering an intersection of line segments of roads that did not correspond to a vertex in both roads. Indicates a node generated directly from road vertex data originating on the server. Indicates a node generated by client road processing code. Indicates the type of node: Standard, Boundary, etc. Floating-point World-space location of this node. An ID derived from the global, real world location of this RoadLatticeNode. This will differ from the LocationUID of any other RoadLatticeNode, unless it occupies the same real world location within the resolution of the underlying map data. Immutable, integer, world-scale mercator location from . Location of this node. Neighboring nodes in the RoadLattice that contains this node. The collection of outbound edges from this node indexed by the target node of each edge. The collection of outbound edges from this node to its neighbors. The number of neighboring nodes in the RoadLattice that contains this node. The outbound edge from this node to a target node. Node to retrieve edge to. The outbound edge to the target node. If this node does not have an edge to the provided target node. Checks if this node has an edge to . Whether this node came from Factile, or it was generated as part of client side road intersection detection. The number of loaded tiles that currently reference this node. Constructor. Location of this node. Whether the node came directly from server data, or was generated client side. Unconditionally adds an edge connecting a new neighbor to this node, replacing any existing edge from this node to the same target. The edge to add. Adds a new edge connecting to the target node of the supplied edge if no edge already exists connecting this node to that node. The edge to possibly add. Returns the relative angle (anticlockwise from positive x-axis, measured in radians) of the line joining this node's location to the location of the supplied node. Node whose relative angle is returned. The relative angle, in radians, of the location of the supplied node. Compares the angles to from this node to the supplied target nodes. First target node. Second target node Positive, zero, or negative indicating whether the angle to n1 is greater, equal to, or less than the angle to n2. Returns a sorted list of neighbor nodes, sorted by angle subtended from this node. Angles are measured anticlockwise from the positive x-axis. Removes any existing edge that currently connects this node to the target node of the supplied edge. The edge to remove if present Whether a matching edge was removed. Removes any edge referencing the supplied node as a neighbour of this node. The node indicating the edge to possibly remove. Whether removal was successful. For example, false will be returned if the supplied node is not a neighbour. Marks this tile a lying on a tile boundary. Moves this node. The offset by which to move this node. Merges the supplied source node with this node by merging the supplied nodes neighbours into this nodes neighbours collection. This merge operation will not result in multiple connections between nodes, even if this node and the merge source already share some neighbour nodes. The node to merge from. Removes any connections between this node and its neighbours, disconnecting it from those neighbours. Indicates whether this node is a valid candidate for removal from its containing road lattice. This is true if the node is not a boundary node, or its reference count is zero. Whether this node is a valid removal candidate. Produces a clone of this , excluding connections to nieghbours. The clone. A helper class that derives an enumerable neighbors collection from this nodes edges collection. Primarily used to provide backwards compatibility, as RoadLatticeNodes previously had a simple neighbors collection rather than an attributed edge collection. Constructor that takes a snapshot of the targets from the supplied collection of edges. Edges from which to snapshot neighbors. A representation of a connected sequence of vertices (a polyline) that can be added to a . This is a simplification of the map feature type containing just the vertices for a single shape, and none of the associated metadata. This removes the need for tight dependency from road lattice system on the map feature system. A vertex definition giving the location of the vertex and a tag indicating if the vertex if on a Tile boundary. Whether this location is on a tile boundary. Indicates if this node came from the server of was generated on the client, e.g., by segment intersection detection. The location. Constructor. Location in world space Whether the location is on a tile boundary Whether this location is from server or client generated Vertices of this segment tagged with source and on-boundary status. ID of the feature this RoadLatticeSegment represents. The source from which the RoadLatticeSegment was generated. Constructor. A list of vertex locations, plus tags indicating if a vertex is on a tile boundary.. The source Segment from which to generate a RoadLatticeSegment. Inserts a vertex into this road lattice segment at the supplied index. The index that the inserted vertex will have. The position of the inserted vertex. The type of lattice node this vertex represents. Whether the vertex came from the server or was generated on the client. Creates a road lattice segment from an indexed in a The segment containing the indexed line. The index of the source line in the supplied segment. The constructed road lattice segment. Creates a collection of road lattice segments from a map feature. The source Segment. An array of generated RoadLatticeSegment objects. Used by for efficiently clustering nearby nodes. This is recycled to reduce garbage. Used by for efficiently finding line intersections. This is recycled to reduce garbage. Used by for efficiently finding line intersections. This is recycled to reduce garbage. Returns a list of objects generated from the features in the supplied . The tile from which to extract segments. The list of generated road lattice segments. Adds a representation of each in the source to the supplied . The lattice to augment. The source of Segments If true, an exhaustive search is performed for intersections that occur at positions that don't correspond to segment vertices. Returns the coordinates found a given length along a node chain. A node chain is defined by a sequence of connected nodes n0..nk where all nodes n1..nk-1 have exactly two neighbors. The node to start from. The next node to traverse in the chain. The length along the node chain to return the coordinates of. Node A in the edge A->B that the returned coordinates lie on. Node B in the edge A->B that the returned coordinates lie on. Returns after encountering an edge with any of the given flags. and are set to the nodes of that edge, and the coordinates of are returned. The coordinates found. Inserts a node between two connected nodes, removing existing edges between them. The first node. The second node. The insertion node. Brute force non-endpoint intersections between a collection of s, adding new vertices to segments at the point of calculated intersections. The segments from which to calculate intersections. The source of the segments. Calculate at most one intersection between the supplied segments, adding a new vertex to each segment where the intersection occurs. First segment. Second segment. Merges a local road lattice's client-generated nodes with all nearby nodes. This method does not support global road lattices (i.e. road lattices created by merging many other road lattices). Among nodes generated from client-side exhaustive intersection testing, some which would otherwise be merged with an existing node sharing its position are instead slightly offset from their shared position. This can cause issues with road intersections where a node one would expect to have four neighbours may instead have two nodes with three different neighbours. Clusters of these 'offset nodes' are found by overlaying a rectangle on top of client node generated, and merging all nodes that fall inside of it. The road lattice to modify. The map tile from which was generated. Returns the minimum encapsulating the two given points. The first point. The second point. The minimum encapsulating the two given points. Returns the global mercator bounds of the given projected to the given zoom level. A projection is given by scaling each corner of 's bounds by 2^x, where x is given by the difference between and the zoom level of . The map tile to return the projected bounds of. The zoom level to project the tile bounds to. The zoom level of is used instead if it is greater than . The global mercator bounds of the given projected to zoom level . Return type of Unity platform that is currently executing. A builder that provides an easy interface for generating Unity Meshes. Creates an instance of a with specified number of submeshes. Number of submeshes present in the , clamped to 1 if smaller value are provided. Submeshes store distinct groupings of triangles, which use a shared vertex list. An instance of a with specified number of submeshes. Creates an instance of a with one submesh. An instance of a with one submesh. The maximum number of vertices any mesh can have. This is a limit imposed by Unity, as it has a 16-bit vertex buffer. Unity supports a maximum of 8 UV channels. Number of submeshes present in this . Constructor. Number of submeshes, clamped to 1 if smaller value are provided. Returns the number of vertices supplied to the MeshBuilder. Returns the number of normals supplied to the MeshBuilder. Returns the number of UV coordinates supplied to the MeshBuilder. The UV channel in range [0..7] to get the number of coordinates from. Returns the number of triangles contained in all submeshes. Returns the number of triangles in a particular submesh. Adds a vertex to the MeshBuilder. The vertex to add. Adds a collection of vertices to the MeshBuilder The vertices to add. Adds a vertex to the MeshBuilder The x coordinate of the vertex. The y coordinate of the vertex. The z coordinate of the vertex. Returns the vertex in the MeshBuilder at the specified index. The index of the vertex to retrieve. Sets the vertex in the MeshBuilder at the specified index. The index of the vertex to set. The vertex data to write to the MeshBuilder. Adds a range of normals to the MeshBuilder. Normals. Adds a normal to the MeshBuilder. The normal to add. Add a normal to the MeshBuilder. The x coordinate of the normal. The y coordinate of the normal. The z coordinate of the normal. Adds a UV to the MeshBuilder. The UV coordinates to add. The UV channel in range [0..7] to add the UV to. Adds a triangle to the MeshBuilder. The first vertex index of the triangle. The second vertex index of the triangle. The third vertex index of the triangle. The submesh to add the triangle to. Adds the specified triangle indices to the MeshBuilder. The number of indices must be divisible by 3 for triangles to be added. Triangles. Submesh. Adds a triangle to the MeshBuilder made up of the specified vertices. The first vertex to add. The second vertex to add. The third vertex to add. The submesh to add the triangle to. Returns the vertices stored in the MeshBuilder. Returns the normals stored in the MeshBuilder. Returns the UVs stored in the MeshBuilder. The UV channel in range [0..7] to get. Returns the triangles stored in the MeshBuilder. The submesh to retrieve. Returns an array of triangle indexes, with all submeshes collapsed into one triangle list. Generates a Unity Mesh that corresponds to the data supplied to the MeshBuilder. Null is returned if the data supplied to the MeshBuilder would form an invalid Mesh in Unity. Empty submeshes are filtered out to prevent errors on iOS builds relating to dynamic batching of empty submeshes. Clears all vertices, normals, UVs, and triangles added to this , so this can be reused. Adds a triangle ensuring that the winding order is such that the triangle's normal faces up, that is, along the positive y-axis. Index for first triangle vertex. Index for second triangle vertex. Index for third triangle vertex. The submesh in which to add the triangle. A collection of utility functions for operating on Unity meshes. Combines the meshes of a target and source mesh, each of which both have 2 submeshes, while preserving the submeshes, and preserving the world space location of source mesh. After calling this method the target object will have two submeshes, with each submesh being the result of merging the corresponding submesh from source and target. objects. The target object. The source object If the number of submeshes is not incorrect. This function should never be called with such GameObjects. Merges the submeshes from source to target in target local space using the supplied offset. Merges the source mesh onto the target mesh without considering the current world space transform of the target, but adds the supplied offset to the effective position of source before merging. This is in contrast to , which merges the source mesh onto the target incorporating current world space relative transforms (i.e., takes into account the relative positioning etc. of the meshes in world space). The target onto which to merge submeshes from source. The source of the merged submeshes. An offset to add to the vertices of source before merging. Combines the meshes of a target and source mesh, each of which both have 2 submeshes, using the local coordinate space of each mesh, but transforming source mesh with the supplied transformation matrix before merging. Meshes are merged using their respective local spaces, i.e., generating vertices that are relative to the respective meshes origin, but the source vertices are transformed by the supplied matrix before merging. This can be used to combine meshes while maintaining world space relative position by calculating the transform matrix from source local space to target local space (as done in ) or using any arbitrary local space relative transform, such as the relative offset used in . The target mesh object onto which the merge is performed. The source mesh object. The transformation applied to source mesh vertices. If invalid meshes are passed. A register for associating metadata objects with s. Object providing the core functionality for this class. Must be added to a game object with a attached. Add a metadata object to a given target object of type *T*. The target object to which the metadata object should be added. The metadata object. Enumerates all of the metadata objects of type *MT* that are associated with the given target object of type *T*. Respects subtyping. The target object for which to look for an associated metadata object. The type of the metadata objects. Enumerate all of the target objects containing one or more metadata objects of the given type. Respects subtyping. The type of metadata objects to enumerate. Remove all the metadata associated with the given game object. Associate metadata objects with target objects. A map from each concrete type to another map which maps target objects of type *T* to a set of instances of the concrete type from the outer map. The inner map is referred to as the "target-to-metadata" map in this source file. The upper closure of all the concrete types (over the subtype relation) against which a metadata object has been registered. Add a metadata object to a given target object of type *T*. The target object to which the metadata object should be added. The metadata object. Remove a metadata object from a target object. The target object to remove the metadata object from. The metadata object to remove. The target doesn't contain the given metadata object. Enumerate the target-to-metadata maps for all the subtypes of *type*. The type whose subtypes will be enumerated. Enumerates all of the metadata objects of type *MT* that are associated with the given target object of type *T*. Respects subtyping. The target object for which to look for an associated metadata object. The type of the metadata objects. Enumerate all of the target objects containing one or more metadata objects of the given type. Respects subtyping. The type of metadata objects to enumerate. Enumerate all of the target objects containing one or more metadata objects of the given type. Respects subtyping. The type of metadata objects to enumerate. Clear all metadata for given target object. Target to clear of metadata. Manages the metadata associated with game objects. Used to clean up metadata when game objects are finalized. Used to add metadata to game objects. Constructor. Finalizer register. Metadata options. Add some metadata to a game object using the configured method. The game object to add the metadata to. The map feature the game object was created from. Unity component type Feature type Metadata for a game object created from a map feature. The map feature used to create this game object. Metadata for a game object created from a map feature. The map feature used to create this game object. Constructor. Metadata that can be added to an object using . Manages the attribute for registered game objects according to the supplied z-order and the type of feature the game object represents. The sorting order value to use for non-basemap features. These don't have a z-order, and are typically drawn on top of the base map. A group of objects that are mutually ordered by z-order. An order-preserving map from z-order to sorting order. The set of objects belonging to this group. Constructor. The order preserving map for this group. Register for finalizers. The z-orders for the registered objects. The z-ordering group for regions. Drawn below roads. The z-ordering group for roads. Drawn above regions and road borders. The z-ordering group for roads. Drawn above roads. All of the z-ordering groups. Set the sorting order of a 's component, if it has one. Add a new z-ordering group to this instance with the specified minimum and maximum sorting orders. The minimum sorting order for this group. The maximum sorting order for this group. The new instance. Constructor. Register for finalizers. The minimum sorting order value to allocate to the managed basemap game objects. The maximum sorting order value to allocate to the managed basemap game objects. The sorting order value to allocate to managed non-basemap game objects. Register a game object representing a region. The game object to register. The z-order value of the feature corresponding to the game object. Register a game object representing a road. The game object to register. The z-order value of the feature corresponding to the game object. Register a game object representing an intersection. The game object to register. The z-order value of the feature corresponding to the game object. Register a game object with a z-ordering group. The game object to register. The z-order value of the feature corresponding to the game object. The z-ordering group to place the game object into. Handle the destruction of a game object that is registered with this class by cleaning up any associated entries. Note that this doesn't remove unused z-orders from the order-preserving maps. The game object being destroyed. Register a non-basemap game object. Note that the corresponding features have no z-order. The game object to register. Handle one of the order-preserving maps being remapped. In this case, the sorting order for existing objects might have changed, so we need to go back and update all the relevant renderers. Provides a mechanism for statically batching GameObjects generated by the SDK. Collects the GameObjects to be statically batched. Adds a GameObject to the static batcher. The GameObject to be statically batched. Statically batches all the GameObjects that have been collected. Treated as the parent of all the GameObjects that will be statically batched. Determines whether a should be batched based on the global default setting for static batching, and the local batching policy. The global default of whether or not to apply static batching to created s. The batching policy for a particular . This can be used to override the global default policy if the user desires. Returns true if globalDefault is true and localBatchingPolicy is not equal to , or if globalDefault is false and localBatchingPolicy is equal to . A set of values that specify whether created GameObjects are statically-batched by %Unity. Use the default static-batching policy set in . Attempt to statically-batch the GameObject created from this MapFeature. This value overrides the global default set in . Do not attempt to statically-batch the GameObject created from this MapFeature. This value overrides the global default set in . Enumeration representing Unity platforms. Unity Android player. Unity IOS Player. Platform unspecified. Utilities for enumeration. Returns true if represents a mobile platform. The platform to check. Describes the state of a currently loaded GameObject. The object for this state. The raw altitudes along the left (west) edge of , in meters above mean sea level. This is stored independently to improve performance. Extracting altitudes directly from would require de-normalization. The extraction process is also markedly slower than reading straight from an array. The raw altitudes along the top (north) edge of , in meters above mean sea level. This is stored independently to improve performance. Extracting altitudes directly from would require de-normalization. The extraction process is also markedly slower than reading straight from an array. The raw altitudes along the right (east) edge of , in meters above mean sea level. This is stored independently to improve performance. Extracting altitudes directly from would require de-normalization. The extraction process is also markedly slower than reading straight from an array. The raw altitudes along the bottom (south) edge of , in meters above mean sea level. This is stored independently to improve performance. Extracting altitudes directly from would require de-normalization. The extraction process is also markedly slower than reading straight from an array. Constructor. The terrain object to save state for. The terrain altitudes in meters above mean sea level. Stores a 3D reference space for UV coordinates. Note: the UAxis and VAxis do not need to be normalized or even the same length. Unexpected results will occur if the axes are not linearly independent (i.e. if they point in the same direction) The three dimensional origin of the UvSpace The axis used to calculate the U component of texture coordinates. The axis used to calculate the V component of texture coordinates. Constructor. The origin. The U-axis. The V-Axis. Calculates the UV coordinates for a vertex relative to this UvSpace. Projects the supplied vertex into the (UAxis, VAxis) plane and returns the coordinates of the projected point relative to the UV axes. The vertex to calculate the UV coordinate for. A default, origin centered, axis aligned UV space. Factory for creating GameObjects from s. Default color for water. Generates a Unity Mesh during GameObject creation. Events to invoke during GameObject creation. Handles the static batching of all created GameObjects marked as static. Used to add metadata to game objects. Used to apply properties of s to s. Constructor. WaterEvents to invoke during GameObject creation. Manages the batching of GameObjects marked as static. The AreaFactory used to create Areas. Finalizer register. Metadata options. Attempts to create a Unity GameObject from the specified AreaWater and Style objects. Returns null if GameObject creation was cancelled by a WillCreate event handler. AreaWater used for construction. Style to apply to the generated GameObject. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. Root . Parent of the generated GameObject. Factory for creating GameObjects from s. Generates a Unity Mesh during GameObject creation. Events to invoke during GameObject creation. Handles the static batching of all created GameObjects marked as static. Used to add metadata to game objects. Used to apply properties of s to s. Constructor. ExtrudedStructureEvents to invoke during GameObject creation. Manages the batching of GameObjects marked as static. Render order manager against which to register game objects created by this factory. Register for finalizers. Metadata options. Attempts to create a Unity GameObject from the specified MapFeature and Style objects. Returns null if GameObject creation was cancelled by a WillCreate event handler. ExtrudedStructure used for construction. Style to apply to the generated GameObject. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. An offset to apply to the transform of the constructed . The minimum height of any base-level extrusions. If any extrusions at the bottom-most level of the are shorter than this value, an additional margin will be added to each contained extrusion, moving the entire building up whilst maintaining its profile. Root of all s Parent of the generated . The MapTile containing the extrudedStructure Factory interface for creating GameObjects from s. Factory for creating GameObjects from s. Generates a Unity Mesh during GameObject creation. Events to invoke during GameObject creation. Handles the static batching of all created GameObjects marked as static. Used to add metadata to game objects. Used to apply properties of s to s. Constructor. ModeledStructureEvents to invoke during GameObject creation. Manages the batching of GameObjects marked as static. Render order manager against which to register game objects created by this factory. Register for finalizers. Metadata options. Attempts to create a Unity GameObject from the specified MapFeature and Style objects. Returns null if GameObject creation was cancelled by a WillCreate event handler. ModeledStructure used for construction. Style to apply to the generated GameObject. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. An offset to apply to the transform of the constructed . Root . Parent of the generated . Factory for creating GameObjects from s. Generates a Unity Mesh during GameObject creation. Events to invoke during GameObject creation. Handles the static batching of all created GameObjects marked as static. Lazily-populated dictionary mapping usage types to materials. Used to add metadata to game objects. Used to apply properties of s to s. Constructor. RegionEvents to invoke during GameObject creation. Manages the batching of GameObjects marked as static. The AreaFactory used to create Areas. Register for finalizers. Metadata options. Get a base map for a with the default color for its . A base map with the appropriate default color. Attempts to create a Unity GameObject from the specified MapFeature and Style objects. Returns null if GameObject creation was cancelled by a WillCreate event handler. Region used for construction. Style to apply to the generated GameObject. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. Root . Parent of the generated . Factory for creating GameObjects from s. Generates a Unity Mesh during GameObject creation. Events to invoke during GameObject creation. Handles the static batching of all created GameObjects marked as static. Used to add metadata to game objects. Used to apply properties of s to s. Constructor. SegmentEvents to invoke during GameObject creation. Manages the batching of GameObjects marked as static. The render order manager to use for game objects created by this factory. Register for finalizers. Metadata options. Attempts to create a Unity GameObject from the specified MapFeature and Style objects. Returns null if GameObject creation was cancelled by a WillCreate event handler, or if the Line within the provided Segment contains invalid geometry, preventing object creation. Segment used for construction. Style to apply to the generated GameObject. When true, will statically batch created GameObjects unless otherwise specified in the corresponding WillCreate event args. Root . Parent of the generated GameObject. Encapsulates metadata associated with a GameObject constructed from a Feature.MapFeature. Returns the Feature.MapFeature used to create this GameObject. A random state associated with the MapFeature. Initializes the with an initial state that is suitable for procedure generation purpose. Encapsulates metadata associated with a GameObject constructed from a Feature.Region. Region used to create this GameObject. Encapsulates metadata associated with a GameObject constructed from a Feature.Segment. Segment used to create this GameObject. Encapsulates metadata associated with a GameObject constructed from an Feature.AreaWater. The %AreaWater MapFeature used to create this GameObject. Encapsulates metadata associated with a GameObject constructed from a Feature.LineWater. Water MapFeature used to create this GameObject. Encapsulates metadata associated with a GameObject constructed from an Feature.ExtrudedStructure. ExtrudedStructure used to create this GameObject. Metadata associated with a GameObject constructed from a Feature.ModeledStructure. ModeledStructure used to create this GameObject. Used to resolve an API key from multiple sources. A collection of s are passed to 's constructor, which are executed sequentially by until one succeeds. Interface for returning an API key. Try to return an API key. Set to the API key, if it exists. True if has been set to the API key found. Returns an API key stored in a resource. The path to the resource. Constructor. The path to the resource. Returns the given key string if it isn't empty; The key to return. Constructor. The key to return. The readers to execute sequentially until one succeeds. Constructor. The readers to execute sequentially until one succeeds. Returns the API key from the first successful passed. The resolved API key. Static Array utility functions. Returns a string representing contents of the supplied array, separated by the supplied separator. This replicates the behaviour available in C#4.0 string.Join(separator, object[]) method, but we are restricted to an earlier C# version that does not support this method. Returns a new Array that is the result of concatenating the supplied Arrays. Source of leading elements in result. Source of trailing elements in result. The type contained in the Arrays. The concatenation of first and second Arrays. Copy the values from src array to dest array offsetting the index of each src entry by the supplied index offset and adjusting the value by the supplied value delta. Source of integer values. Destination of integer values. Index offset used to relocate values in dest with respect to their position in source. Value delta to add to each copied integer. Returns whether two arrays contain exactly the same values, using the supplied comparer, or defaulting to the Type's Equals method if no comparator is provided. The first Array. The second Array. An optional Equality Comparer. Whether the compared arrays contain the same values in the same order. Returns the largest and smallest values in the provided array. The input array. An optional comparer. The smallest found value in the provided array. The largest found value in the provided array. If the provided array is null. If the provided array has length 0. Utilities for generating Client Info. The key which the User ID is stored under in PlayerPrefs. Metadata describing the Semantic Tile API client (application + SDK) for use in logging. Metadata describing the Semantic Tile API client (application + SDK) for use in logging. Same as _ClientInfo but using the newer version of the proto. Gets the static ClientInfo. The ClientInfo. Gets the static ClientInfo in the new proto format. The ClientInfo. Initializes the client info. Converts ClientInfo into the new proto. Converts ClientInfo platform to the new proto enum. Sets the client info for testing, since we can't get a bunch of client info in a unit test environment. This should only be used inside test methods. The fake client info for testing. Generates the metadata describing the Semantic Tile API client. The generated ClientInfo. Builds a base64-encoded ClientInfo string, for use in the X-VectorTile-ClientInfo header. The body for the request. Generates a pseudonymous random string that represents a User ID and stores it in . Retrieves an existing User ID if one was previously created. The generated User ID is a random 128-bit sequence that is converted into a base-64 encoded string. Gets the ID of the application running the SDK. For iOS apps, returns the bundle identifier. For Android apps, returns the package name. Returns the version of the application running the SDK. Returns the platform on which the application is running. Maps the runtime platform reported by Unity to the appropriate ClientInfo Platform enum. The runtime platform to map. Returns the OS name and version on which the application is running. Returns the name and version number of the Semantic Tile API client (this SDK). The returned data is in the format sdk_name sdk_version (unity_version). Gets the model of the device running the application. Utilities for collections. Adds the items from to in reverse order. The destination collection. The source list. Encapsulates utility methods for working with coordinate systems. The maximum supported zoom level. The minimum supported zoom level. Converts a Vector2D value (Earth-scale Mercator space) into a Vector3 (Unity Worldspace), by translating relative to the floatingOrigin and scaling relative to the mercatorScale. The Vector2D value to convert. Mercator scale factor. Floating origin in Earth-scale Mercator space. A Vector3 value in Unity Worldspace. Converts a Vector2D value (Earth-scale Mercator space) into a Vector3 (Unity Worldspace), by translating relative to the floatingOrigin and scaling relative to the mercatorScale without crossing or wrapping around the antimeridian - should be used when the longitude is needed to be in the range of -180 degrees to 180 degrees which goes all around the world. Antimeridian is the line at -180/180 longitude. Crossing the antimeridian ensures that the longitude stay all positive or all negative. (i.e. 170 degrees to -170 degrees (340 degrees apart) becomes 170 degrees to 190 degrees (20 degrees apart)) However, when it is comes to converting a large, low zoom level to Bounds, crossing the antimeridian causes its Bounds to be lot smaller than it is as we do want the Bounds of to go all the way around the world. The Vector2D value to convert. Mercator scale factor. Floating origin in Earth-scale Mercator space. A Vector3 value in Unity Worldspace. Converts a Vector3 value (Unity Worldspace) into Earth-scale Mercator space (Vector2D). Inverse of (ie. takes into account that the Vector3 value would have been translated relative to the floatingOrigin" and scaled relative to the mercatorScale. The Vector3 value to convert. Mercator scale factor. Floating origin in Earth-scale Mercator space. A Vector2D value in Earth-scale Mercator space. Converts a Unity Worldspace value (Vector3) into Google Maps Tile Coordinates (TileCoord). The conversion is lossy, since TileCoord space is less granular than Vector3 space. See: https://developers.google.com/maps/documentation/javascript/maptypes#TileCoordinates The Vector3 value to convert. Zoom level. Mercator scale factor. Floating origin in Earth-scale Mercator space. Whether to limit the tile coords to the extents of tile coord space at this zoom level. A TileCoord value. Converts a TileCoord value (Google Maps Tile Coordinates) into Unity Worldspace (Vector3). For convenience, the south-west corner of the tile is chosen, since this corresponds to the local tile origin in Vector3 space. Inverse of . The TileCoord value to convert. Zoom level. Mercator scale factor. Floating origin in Earth-scale Mercator space. A Vector3 value in Unity Worldspace. Converts a TileCoord to the square Bounds covered by that tile in Worldspace with zero vertical extent. Tile coordinates. Zoom level. Mercator scale factor. Floating origin in Earth-scale Mercator space. Converts a point within a tile into Worldspace coordinates. Tile coordinates. X coordinate within the tile. 0 is the west edge, 1 is east. Y coordinate within the tile. 0 is the south edge, 1 is north. Zoom level. Mercator scale factor. Floating origin in Earth-scale Mercator space. Converts a point within a tile into Worldspace coordinates without crossing or wrapping around the antimeridian - should be used when the longitude is needed to be in the range of -180 degrees to 180 degrees which goes all around the world. Antimeridian is the line at -180/180 longitude. Crossing the antimeridian ensures that the longitude stay all positive or all negative. (i.e. 170 degrees to -170 degrees (340 degrees apart) becomes 170 degrees to 190 degrees (20 degrees apart)) However, when it is comes to converting a large, low zoom level to Bounds, crossing the antimeridian causes its Bounds to be lot smaller than it is as we do want the Bounds of to go all the way around the world. Tile coordinates. X coordinate within the tile. 0 is the west edge, 1 is east. Y coordinate within the tile. 0 is the south edge, 1 is north. Zoom level. Mercator scale factor. Floating origin in Earth-scale Mercator space. Converts a distance in Worldspace coordinates to the maximum number of tiles that could be covered by that distance. Distance in Worldspace coordinates. Zoom level. Converts a Bounds value (Unity Worldspace) into a list of Google Maps Tile Coordinates. The Bounds value to convert. Zoom level. Mercator scale factor. Floating origin in Earth-scale Mercator space. A list of Google Maps Tile Coordinates. Calculates the distance in terms of a Unity Worldspace value (Vector3) between the tile coordinate and a point. Uses the closest point on the to the point to calculate the distance from. If the point is on the , it will return zero. Precondition: point is not null. Tile coordinate. Point in worldspace. The distance result. Returns the tile origin, tile size and world position origin from the supplied . The tile origin is the TileCoord of the tile containing the floating origin. The coords from which to derive tile size data. The current zoom level. Output for tile origin. Output for tile size. The relative offset of the SW corner of the tile containing the floating origin as measured from the map anchor, i.e., the floating origin. Scaling multiplier used to stretch map tile geometry (in "tile local" coords) into Unity Worldspace (Vector3). Coordinate system used to determine the scaling factor due to Mercator distortion. Zoom level of the . Get the world space size of a tile from the tile scale. Tile scale. A generic class to use for passing a result from a coroutine back to the caller, that supports cancellation from outside the coroutine, and also child sub-coroutines that are also cancelled when the parent is cancelled. Type of the result. Instruction to yield in a coroutine to wait until a CoroutineResult is Done. Result to wait for. Constructor. Result to wait for. Called once per frame to check whether to finish waiting and resume the coroutine. Enum representing the states the result can be in. Coroutine is in progress. Coroutine has finished successfully. Result contains the return value; Done is true. Coroutine was cancelled. Current state. Result on success. List of child coroutine results to recursively cancel if this is cancelled. Whether the coroutine has finished. implicitly sets this to true. does not, because it's expected to be called from outside the coroutine; the coroutine is expected to call to check whether it has been cancelled, which will set this to true. Constructor. Constructor with a parent. Parent coroutine result. If the parent coroutine is cancelled, it will cancel this one. Reports that the coroutine has finished with a successful result. If has been called, this does nothing. Result of the coroutine. Cancels the coroutine and its child sub-coroutines. This is typically called from outside the coroutine. Calling code should yield the return value to wait until the coroutine has actually finished. This depends on the coroutine to check periodically. If the coroutine doesn't handle the cancellation (either because it doesn't check at all, or because was called too late and the coroutine is ready to return), then has the same effect as . It is implicit that coroutines should wait for child routines that they care about the result of to be done before returning. This method is useful for tests. Waits for this coroutine to be done. Does not wait for its children to finish. Adds a child that should be cancelled if this is cancelled. Child coroutine result. Checks whether the coroutine is still running. Checks whether the coroutine finished successfully. Checks whether the coroutine has been cancelled. If the coroutine has been cancelled but hasn't finished, abort with no result and return true. Otherwise return false. Logging utility class. The Verbose* methods in this class are used to log verbose messages (that is, messages that are relevant for SDK developers and developers using the SDK) to the Unity console. These methods are simple wrappers around the Unity.Log* methods that only generate output if: * The SDK was built with the DEBUG flag, and * the client explicitly turned on verbose logging via the method. This is to ensure that verbose logging doesn't affect release builds or clog up the console. NUnit tests should set "Debug.logger.logEnabled = false" to ensure that calls to Debug.Log() don't generate runtime exceptions (Debug.Log() cannot be called outside of a Unity project). Specifies string decoration arguments. Whether to prepend the log code to the message. Whether to append a link to the documentation to the message. The log handler to send messages to. If this is null, is used by default. Whether to enable verbose log messages. Logs to the Unity console. The log code. The log message. Object to which the message applies. Logs a warning to the Unity console. The log code. The log message. Object to which the message applies. Logs an error to the Unity console. The log code. The log message. Object to which the message applies. Logs to the Unity console if verbose logging is enabled. String or object to be converted to string representation for display. Object to which the message applies. Returns . If is null, is returned instead. Returns if it is not null. Otherwise, is returned. Decorates a log message to print to the Unity console. The log type. The log code. The (undecorated) log message. The decorated log message. Decorates a log message to print to the Unity console. The log code. The (undecorated) log message. The string decoration arguments. The decorated log message. Log codes used to identify warnings and errors logged throughout Musk. https://developers.google.com/maps/documentation/gaming/support/error_codes The possible error codes. These must be kept in sync with our external documentation. Tried to destroy a non-SDK object. Couldn't find the base map shader. Failed to setup network connections on the Android device. Failed to find the DeviceCountryProvider script. Failed to determine device country. google3/geo/gaming/unity/project/Assets/GoogleMaps/Scripts/DeviceCountryProvider.cs hard-codes the error message for this log code. Ensure it is updated if this error code ever changes. Attribution GameObject has been modified externally and is now in an invalid state. Using an unsupported zoom level. See . Generates a documentation link from a . The log code. Example: Given LogCode.ExampleLogCodeToDemonstrateFormattedString, this method will return "#example-log-code-to-demonstrate-formatted-string". A set of utility methods for performing maps decoration. Places a Prefab on an . Instantiates the Prefab as a child of specified at specified position relative to . A that will be the parent of the instance of . A Prefab that will be placed. The position of the to instantiate. The position coordinate is relative to the . Ear clipper algorithm for triangulating polygons. This algorithm runs in O(n^2) time, where n is the size of the vertex list passed to . The position of the vertex. The index of the vertex in its source list. Whether the vertex is convex. The node containing the next clockwise-ordered vertex. The node containing the previous clockwise-ordered vertex. The ear node containing the node of this vertex, if it exists. Finds the triangulation of the given vertex list. The vertex list is assumed closed (i.e. the last vertex is not repeated), and the vertices are assumed to be on the x-z plane, with y values ignored. The vertex list. The offset to add to vertex indices in the triangles array. The triangulation of the given vertex list. Finds the ears that triangulate the given vertex list. The vertex list. All convex vertices must come before any concave vertex in the list. The offset to add to vertex indices in the triangles array. The triangulation of the vertex list. Returns true if the given vertex node is an ear. The node to test. True if the given vertex node is an ear. Updates a potential ear node, removing it from or adding it to where appropriate. The list of ear nodes. The node to update. Updates a vertex's convexity after a removal operation in the vertex list, and re-inserts it into the list if its convexity changed. The vertex to update. Returns true if any concave point in the vertex list is in the triangle. The first point of the triangle. The second point of the triangle. The third point of the triangle. The vertex list to test against. All convex vertices are assumed to come before any concave vertex in the list. True if any vertex in the vertex list lies inside the triangle. Returns true if the vertex at the given index is convex. The vertex in the collection to test. True if the vertex is convex. Returns true if the vertex b is convex. A vertex adjacent to b. A vertex adjacent to a and c. A vertex adjacent to a. True if the vertex b is convex. Interface for objects that can be used to start a coroutine. Used to avoid a direct dependency on MonoBehaviour for code that needs to call StartCoroutine but doesn't otherwise depend on Unity, so that it can be unit tested. Note that implementations may stop all the coroutines clients have started through them at any point, and it is not always immediately safe to start coroutines after this has happened. Use to deal with coroutine shutdown and to start coroutines up safely. Starts a coroutine. Coroutine to start. Adds a listener for events on the coroutine starter. Listener to register. Removes a listener for events on the coroutine starter. Listener to register. A proxy for UnityEditor functions. This allows us to skip a level of dependency. Is the player currently being built? True if the player is currently being built, false otherwise. Wrapper for *EditorUtility.DisplayDialog*. Creates a BeforeAssemblyReload action to be passed in for and Add the specified delegate to a static method to beforeAssemblyReload. Remove the specified delegate to a static method to beforeAssemblyReload. Return delegates from invocation list for beforeAssemblyReload. Enable or disable continuous player loop updates (applicable only to edit mode). Whether to enable or disable continuous player loop updates. Returns an instance of for the current device language. Returns an instance of for the current device language. Falls back to if the current device language is unsupported. An instance of for the current device language. Returns an instance of . Returns an instance of . An instance of . A set of utility methods for localization. Gets the device's CLDR language identifier. Mapping generated from https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry Defaults to "en" if language could not be determined. Utilities related to . Coroutine that yields once and then calls an . The action to call after yielding. Executes an action next frame by scheduling a coroutine on the given MonoBehaviour. to use to execute the action. The action to execute next frame. A builder that provides an easy interface for constructing URLs as strings. It constructs urls of the form "protocol://hostname/path/to/resource?param1=value1&param2=value2&param2=value3". The supported URL format is inline with Google HTTP API Conventions. See "http://google3/google/api/http.proto?l=108&rcl=242569597" for more information. wrapped by this class to facilitate the construction of Urls. The query parameters. Query parameters are appended to the URL in the order in which they were first added to the builder. This also applies to multiple values mapped to a single key. Constructor. The scheme/protocol for the URL. The name of the host containing the resource being requested. The port number to use when accessing the service. An argument value of -1 indicates no port number. The path within the host to the resource. Defaults to the empty string for urls that don't require a path. Constructor. The scheme/protocol for the URL. The name of the host containing the resource being requested, optionally including the port number in the form host:port. The path within the host to the resource. Defaults to the empty string for urls that don't require a path. If an invalid host/port is provided. Adds a query parameter to the URL. Can be called multiple times to add multiple values to the same parameter name. Query parameter names and values are url escaped. The name of the query parameter to add. The value of the query parameter to add. Defaults to null for parameters that do not require a value. Itself, for chaining operations. Constructs a url string using the contents of the . Constructs OnePlatform compliant URL query string for the query parameters stored in the . Utils for creating previewable SDK components. Creates a new suitable for use with previewable SDK components. If in edit mode the will be marked with , otherwise a regular will be returned. This ensures that the user's scene isn't clobbered with preview objects while in edit mode. The new instance. Creates a new containing a suitable for use with previewable SDK components. The new instance. Makes an existing compatible with previewable SDK components. If in edit mode, the will be marked with , otherwise, it is left untouched. This ensures that the scene isn't clobbered with preview objects while in edit mode. The to make compatible with edit-time preview. Destroy an object using while playing. Otherwise, destroy using . The object to be destroyed. A comparer that compares values after first translating them using a dictionary. The type of the untranslated values. The type of the translated values. The dictionary to use for translation. Constructor. The dictionary to use for translation. Compare two values after first translating them using a dictionary. If either value doesn't exist in the dictionary then the result is unspecified. The first value. The second value. A set of geometry related utility methods and classes. An equality comparer for objects that uses the == operator. Using the == operator results in epsilon comparison. The == operator documentation states: two vectors are considered equal if the magnitude of their difference is less than 1e-5. Default singleton. An equality comparer for objects that uses the == operator. Using the == operator results in epsilon comparison. The == operator documentation states: two vectors are considered equal if the magnitude of their difference is less than 1e-5. Default singleton. An immutable struct representing an edge within a . Stores indices into the 's vertices array. Guarantees that is always less than so that a comparison between two s will always be equal iff it is composed of the same two vertex indices. First index. Second index. Constructor. The first vertex. The second vertex. Converts the indexed edge to a human-readable string. An immutable struct representing a circle in 2D space. A position of the center of the circle. A radius of the circle. Constructor. The position of the center of the circle. The radius of the circle. Tries choosing a random point within a given with a distance from the 's boundary not less than the specified distance value. This use the randomized algorithm with specified number of tries (see go/musk-roof-dec). In case of success, this method returns true and pass out the resulting via parameter. Otherwise, returns false. An area to random a point inside. A minimum distance from the boundary of an . A maximum number of tries to random a point. A resulting random point. Tries choosing a random circle with specified radius. Must meet the following conditions: * The circle is completely inside a specified . * The nearest distance from any point on the circumference to the 's boundary is not less than . * The circle does not collide with any circle given in . This use the randomized algorithm with specified number of tries. In case of success, this method returns true and pass out the resulting representing the position of the center of the randomised circle via parameter. Otherwise, returns false. An area in which to randomly place a circle. The boundary edges of the . A radius of the circle to place. A minimum distance from the boundary of an . A maximum number of tries to random a circle. A collection of existing circles. A position of the center of the resulting circle. Checks whether a given point is in the stroking area. Internal for testing. An area to be checked. A given point to be checked. The location is relative to the 's . An array containing boundary edges. A margin size, i.e. stroking size. Randomises a point within a specified . An area to random a point inside. Gets an array of boundary edges of an . Boundary edge is an edge that is shared with only one triangle (face) in an . An area to find boundary edges. Creates two boundaries parallel to a (one on either side of the line) by extruding the each segment in the line out by a provided width. The vertices that define the line to extrude. Desired perpendicular distance between the extruded boundaries. The first boundary of the extrapolated segment. The other boundary of the extrapolated segment. Creates two boundaries parallel to a segment (one on either side of the segment) by extruding the segment out by a provided width. Vertex that defines the start of the line segment to extrude. Vertex that defines the end of the line segment to extrude. Desired perpendicular distance between the extruded line segments. Vertex that defines the start of the first extruded line segment. Vertex that defines the end of the first extruded line segment. Vertex that defines the start of the second extruded line segment. Vertex that defines the end of the second extruded line segment. Randomly picks a face (triangle) in a specified . This method randomises a face uniformly based on each triangle's area. An area to pick a face. An array's index of the first vertex of the picked face. An array's index of the second vertex of the picked face. An array's index of the third vertex of the picked face. Calculates the area of the given triangle. The first vertex of the triangle. The second vertex of the triangle. The third vertex of the triangle. Uniformly chooses a random point within the triangle area specified by 3 given vertices. The first vertex of given triangle. The second vertex of given triangle. The third vertex of given triangle. Checks if a point sits acceptably close to the line segment between and to be considered sitting on top of the line segment. The start of the line segment. The end of the line segment. Given point to be checked True if the point is on the line segment, false otherwise. Checks if two points are close enough together to be considered equal. First to check. Second to check. True if the vectors are close enough to be considered equal. Checks whether the orthogonal projection of the given point onto the line passing through v1 and v2 lies between v1 and v2. A first point on the line. A second point on the line. Given point to be checked. Calculates the orthogonal distance from the given point to the line passing through and . In case of equals to , the distance from to is returned instead. The first point that lies on the line. The second point that lies on the line. Given point. Uses the determinant rule to calculate the area of the rhombus determined by the supplied 2D vectors. See, e.g., https://en.wikipedia.org/wiki/Exterior_algebra#Areas_in_the_plane. First vector Second vector The area of the rhombus defined by the supplied vectors. Uses the determinant rule to calculate the area of the rhombus determined by the supplied 2D vectors. See, e.g., https://en.wikipedia.org/wiki/Exterior_algebra#Areas_in_the_plane. The line segments are assumed to be on the XZ plane First vector Second vector The area of the rhombus defined by the supplied vectors. Determines any intersection between two 2D line segments specified by their end points, returning false if no intersection exists. One end of first line segment Other end of first line segment One end of second line segment Other end of second line segment Output parameter for location of intersection if found Whether the supplied line segments intersect Determines any intersection between two 2D line segments specified by their end points, returning false if no intersection exists. One end of first line segment Other end of first line segment One end of second line segment Other end of second line segment Output parameter for location of intersection if found Output parameter for the parametric distance of the intersection from p to q if an intersection is found. Whether the supplied line segments intersect Determines any intersection between two 2D line segments specified by their end points, returning false if no intersection exists. The line segments are assumed to be on the XZ plane One end of first line segment Other end of first line segment One end of second line segment Other end of second line segment Output parameter for location of intersection if found Whether the supplied line segments intersect Determines any intersection between two 2D line segments specified by their end points, returning false if no intersection exists. The line segments are assumed to be on the XZ plane One end of first line segment Other end of first line segment One end of second line segment Other end of second line segment Output parameter for location of intersection if found Output parameter for the parametric distance of the intersection from p to q if an intersection is found. Whether the supplied line segments intersect Returns the vertices that encapsulate a given bounds. The bounds to compute the vertices of. The array of vertices encapsulating the given bounds. Constructs the smallest possible bounds to encapsulate a given vertex array. The vertex array the bounds should encapsulate. The smallest possible bounds encapsulating the vertex array. Returns the point on a line segment closest to a given point. One end of the line segment. The other end of the line segment. The point to test against to find the nearest point on the line segment. The distance along the line where the closest point was found. The point on the line segment closest to the given point. Returns the point on a line closest to a given point. The vertices that define the line. The point to test against to find the nearest point on the line. The distance along the line where the closest point was found. The point on the line closest to the given point. Returns the point along the line after tracing it by a given distance from a given start point on the line. The line to trace. The distance to trace the line by. The line is assumed to start from the vertex at index 0. A negative distance will return the start of the line, while a distance exceeding the length of the line or a start point not on the line will return the end of the line. The point along the line after tracing it by a given distance from a given start point on the line. Slices the line to be a specified length from a given start distance, removing all other points outside this interval. If the start and end points of the sliced line don't exist in the original line, they are added. The line to slice. The length of the sliced line. The length along the line to start from. The sliced line. Returns the length of the given line. The line to calculate the length of. The length of the given line. Returns a with the given min and max points. The minimum point of the rect. The minimum point of the rect. The minimum point of the rect. The minimum point of the rect. The rectangle with the given min and max points. Returns true if the two rectangles overlap. This method also returns true if the two rectangles overlap only at their boundaries. The first rectangle to test. The second rectangle to test. True if the two rectangles overlap. Returns true if the given rectangle contains the given point. This method also returns true if the point lies on the boundary of the rectangle. If you do not want this behaviour, use . The rectangle to test. The point to test. True if this rectangle contains the given point. Returns the minimum encapsulating the given point. The point to encapsulate. The minimum encapsulating the given point. A directed pair of . The type of the elements this edge connects. An event that occurs in the process of the scan plane algorithm implemented in TriangulationInsetter used to maintain a triangulation of the inset polygon as time progresses. The type of event. Point events occur when a triangle collapses to a point. Edge events occur when one edge of a triangle collapses to a point. Split events occur when an edge is split in two by a vertex. Flip events occur when the triangulation would contain a negative triangle. A stop event is used to signal an early exit from the algorithm. The point in 2+1D space-time at which the event occurs. The type of the event. The edge of the triangle involved in the event. Applicable to Edge, Split, and Flip events. The time at which the event occurs. Implements the interface. An `Event` object to compare with this one. Indicates whether the specified `Event` is equal to this `Event`. Overrides the `%GetHashCode()` method. Constructs an event of the given type at the given time. The time at which the event occurs. The type of the event. The edge involved in the event, if applicable. Constructs an event of the given type and edge at the given point in 2+1D space-time. The point at which the event occurs. The type of the event. The edge involved in the event, if applicable. A triangle with some specific orientation. The base triangle with arbitrary orientation. The orientation of this triangle relative to the base. The A vertex of this triangle, accounting for its orientation relative to its base triangle. The B vertex of this triangle, accounting for its orientation relative to its base triangle. The C vertex of this triangle, accounting for its orientation relative to its base triangle. Gives the vertices of the triangle by orientation, accounting for its orientation relative to its base triangle. The orientation of the desired vertex. Thrown when an invalid orientation is given. Constructs an oriented triangle given a base triangle and a relative orientation. The base triangle. The orientation of this triangle relative to Constructs an oriented triangle given an oriented triangle and a relative orientation. The original oriented triangle. The orientation of this triangle relative to Thrown when an invalid orientation is specified. Gives the edge corresponding to the given orientation. Specifically, the edge from the vertex specified by the orientation to the following vertex. The orientation of the desired edge. The edge between the specified vertices. Internal representation of a Plane defined by a normal vector and dot product with normal. Unity's Plane representation normalizes the normal vector to get a unit vector and hence introduces floating point error that causes stability issues. The normal vector of the plane. Not required to be a unit vector. The constant value produced by the dot product of any point in the plane with the normal. Constructs a plane perpendicular to the given vector with constant dot product with normal. The normal vector of the plane. The constant value for the dot product of the normal with any point in the plane. Constructs an x-y aligned plane at above the origin. The height of the plane above the origin. Computes the intersection point of the three given planes, if it exists. The first plane. The second plane. The third plane. The intersection point of the three planes. An indexed straight skeleton into a list of vertices. https://en.wikipedia.org/wiki/Straight_skeleton The vertices of the skeleton. A list of pairs of indices into the vertex array specifying each edge. Constructs a straight skeleton given the underlying vertex and edge index arrays. The vertex array. The edge index array. A counter-clockwise oriented triplet of vertices representing a triangle. Used to specify a vertex or edge of the triangle relative to the arbitrary base orientation of vertex A. Returns the orientation of the vertex following the given orientation. The original orientation. The new orientation. Thrown if orientation is invalid. Returns the orientation of the vertex preceding the given orientation. The original orientation. The new orientation. Thrown if orientation is invalid. A vertex of the triangle. A vertex of the triangle. A vertex of the triangle. The next event this triangle is involved in, or null if none or unknown. Gives the vertices of the triangle by orientation. The orientation of the desired vertex. Thrown when an invalid orientation is given. Checks whether or not this triangle is a standalone, closed polygon. Whether or not this triangle is closed. Gives the edge corresponding to the given orientation. Specifically, the edge from the vertex specified by the orientation to the following vertex. The orientation of the desired edge. The edge between the specified vertices. Constructs a Triangle given a triplet of vertices assuming counter-clockwise orientations are positive and clockwise are negative. The first vertex. The second vertex. The third vertex. Utility class for insetting triangulations. Given a triangulation and optional wavefront edge velocities is able to compute the resulting polygon after allowing the wavefront edges to propagate inwards for some amount of time. Additionally computes the straight skeleton of the polygon (https://en.wikipedia.org/wiki/Straight_skeleton). Default velocity of the s if none is specified. The current time to which the polygon has been inset relative to the original polygon. The initial triangulation used to construct the insetter. For each directed edge in the triangulation, the triangle to which it belongs, oriented such that the edge in question is the AB edge of the triangle. The event queue for the scanplane algorithm. For each vertex in the straight skeleton, the set of vertices with an edge to this one. For each wavefront vertex in the straight skeleton, the vertex from which it originated. Constructs an insetter at zero inset distance. Assumes a perfect triangulation of a simple polygon with holes. A perfect triangulation contains no internal vertices, including vertices between pairs of collinear edges. The triangulation to inset. Optional velocities for each external edge. Thrown when the triangulation is invalid. Inset the polygon until the given time, then stop. The time to inset to. Point events occur when a triangle collapses to a point. The relevant triangle is removed from the triangulation. Edge events occur when one edge of a triangle collapses to a point. The vertices at either end of the edge are replaced with a new vertex and the triangle is removed from the triangulation. Split events occur when an edge is split in two by a vertex. The relevant vertex is split into two and its adjacent triangles updated depending on which side of the original triangle they are on. The original triangle is then removed. Flip events occur when the triangulation would contain a negative triangle. The quad formed by the two triangles that share this edge is flipped to be triangulated the other way around to avoid one of the triangles becoming negative. Get the initial triangulation that is being inset. The initial triangulation. Get the triangulation at the current time. The triangulation at the current time. Get the straight skeleton at the current time. The frontier vertices are converted to static vertices by computing their location at time . The straight skeleton at the current time. Finds the index of the first element in the sorted that does not compare less than (by , if provided). If no element does not compare less than , returns the list length. The sorted list of elements to search in. The value to search for. The comparer by which the list is sorted, if not by default. The type of elements in the list. The index of the first element not less than the search value. Get the triangulation of the difference between the initial polygon and the polygon at the current time. This represents the border region between the original boundary and the inset boundary. The triangulation of the difference between the initial and current triangulations. Computes the next event for a given triangle and updates the relevant data structures. The triangle in question. The next event for the given triangle. Returns the lesser of the arguments where null is considered greater than everything. The first . The second . The lesser of and . Returns the next event that will occur for this triangle. The triangle in question. The next event for this triangle. Helper function to compute the time at which a point event will occur for a given triangle. A ______ B \ / \ / ------> . \/ C The triangle for which the event occurs. The time at which the event occurs. Helper function to compute the time at which an edge event will occur for a given triangle. C C \ /\ / \ | / \ / \ / \ / \ / \ | / \ / \ / \ / \ / ------> \ | / \ / \ / \ / \ / \ | / \ / \ / \/________________\/ V A B new The triangle for which the event occurs. The time at which the event occurs. Helper function to compute the time at which a split event will occur for a given triangle. B B \ /| \ | \ | \ | \ / | \ | \ | \| new C \/ | ------> /\ | / | /| new / \ | / | / | / | / \| / | A A The triangle for which the event occurs. The time at which the event occurs. Helper function to compute the time at which a flip event will occur for a given triangle. B B /|\ |\ / | \ | \ / | \ | \ / | \ | \ C / | \ ------> C |____\ \ | / | / \ | / | / \ | / | / \ | / | / \|/ |/ A A The triangle for which the event occurs. The time at which the event occurs. Helper function to get the triangle that shares the specified edge with the given triangle. The triangle for which to find the neighbour. The edge of the triangle shared with the neighbour. The neighbouring triangle, oriented such that AB is the shared edge. Helper method to remove a triangle from the triangulation and clear its event. The triangle to remove. Helper function to update a vertex of a triangle while maintaining . The triangle to update. The vertex of the triangle to update. The new value for the vertex. Helper function to switch a quad to its other triangulation. Used to handle flip events. The common edge of the two triangles in the quad. Finalizes and closes the frontier edge ending in by removing the frontier edge and adding a static skeleton edge from the start of the frontier edge to . The wavefront vertex at the open end of the edge. The static vertex with which to close the edge. An exterior edge of the triangulation that moves inwards with some velocity. The original edge of the triangulation. The velocity with which the edge is moving to its left (inwards). Constructs a wavefront edge that starts between tail and head and moves inwards at the specified velocity. The start of the edge at time 0. The end of the edge at time 0. The velocity with which the edge moves. Constructs a wavefront edge from an indexed edge and a list of vertices. An indexed edge. The vertex list indexes into. The velocity with which the edge moves. The (non-unit) normal vector of the plane swept by the edge as it moves through time. The normal vector of the plane. The plane swept by the edge as it moves through time. The plane. The time at which all three given edges intersect at a common point, if one exists. The first edge. The second edge. The third edge. The time at which the edges intersect at a common point. The unique point in two spatial dimensions and one time at which the three planes intersect, if it exists. The first plane. The second plane. The third plane. The point in space-time at which the planes intersect. A vertex in the inset triangulation, defined by the intersection of a pair of s. The wavefront edge directed towards this vertex on which this vertex lies. Incident (adj.): Falls upon or into. From the latin in- + cado ("to fall"). The wavefront edge directed away from this vertex on which this vertex lies. Excident (adj.): Falls out or from. From the latin ex- + cado ("to fall"). Constructs a WavefrontVertex given its incident and excident s. The wavefront edge on which this vertex lies that is directed towards this vertex. The wavefront edge on which this vertex lies that is directed away from this vertex. Computes the position of this vertex at the given time. The time for which to find the position. The position of the vertex at the given time. The initial position of the vertex at time 0, if it is well defined. The position of the vertex at time 0. The velocity of the vertex, if it is well defined, derived from the velocities and orientations of the edges that define this vertex. The velocity of the vertex. Utility class for triangulating monotone polygons. Compares s by distance along the given direction vector. Breaks ties using distance along the perpendicular. This is like sorting first by x, then by y, but where the x-axis is in the given direction. The direction in which to compare elements. Constructs a new comparer with the given . The direction in which to compare elements. Compares a pair of s by distance along . Breaks ties using distance along the vector perpendicular to . Left hand . Right hand . -1 if comes before , 0 if equal, and 1 if after. Computes an indexed triangulation of the given , which must be monotone in the given . The boundary loop of the polygon. The direction in which the polygon is monotone. The triangle index array. Compares Vector2s radially around a given origin. Constructs a new RadialComparer around the given point. The origin around which to compare vectors. A monotonic function in the range [0, 4) on the angle of . Based on the piecewise-monotonic function f((x, y)) = x / (abs(x) + abs(y)). Observe that we can scale the vector without changing the result of this function, so it is purely dependent on direction. Consider now some unit-length vector rotated by some angle around the origin. For the range [0, PI/2], x decreases monotonically, and the denominator never drops faster than x, as it is simply (x + y) in this quadrant, and y must be increasing, so the rate of change of (x + y) is strictly greater than that of x. It follows that f decreases monotonically from 1 to 0. Similar arguments exist for the other quadrants to show that f is monotonic in each quadrant, and indeed that it monotonically decreases over the domain [0, PI] and monotonically increases over [PI, 2PI]. As the vector rotates, f describes a V-shape from (0, 1) to (PI, -1) and back to (2PI, 1). By negating the section of this function in the domain [0, PI] (where y >= 0), we get a piecewise monotonically increasing function. Adding 1 in the domain [0, PI) and 3 in the domain [PI, 2PI), we can make this function continuous and strictly positive. As such we now have a monotonically increasing, continuous, and strictly positive function in the angle of the vector which we refer to as the pseudoangle due to its relationship to the angle of the vector itself. This is theoretically more stable than Unity's trigonometric functions. The vector to find the pseudoangle of. The pseudoangle of the vector. Compares and radially around , in the continuous range of angles [0, 2*PI). The left hand vector. The right hand vector. Negative if is less than , 0 if equal, and positive if greater. Compares Vector3s radially in the x-y plane around the given origin. Constructs a new RadialComparerXY around the given point. The origin around which to compare vectors. Compares and radially in the x-y plane around the given origin, in the continuous range of angles [0, 2*PI). The left hand vector. The right hand vector. Negative if is less than , 0 if equal, and positive if greater. Utilities for working with triangles. Computes the signed area of the triangle described by the given vertices. The first vertex. The second vertex. The third vertex. The signed area of the triangle. Returns true if the given point lies inside the the given 2D triangle. The triangle is assumed to be on the x-z plane. The first point of the triangle. The second point of the triangle. The third point of the triangle. The point to test. True if the test point lies inside the triangle. Computes the signed area determinant of the triangle described by the given vertices. The first vertex. The second vertex. The third vertex. The signed area determinant of the triangle. An indexed triangulation into a list of vertices. The vertices of the triangulation. A list of triples of indices into the vertex array specifying each triangle. Constructs a triangulation given the underlying vertex and triangle index arrays. The vertex array. The triangle index array. Gives all indexed edges of all triangles in the triangulation. The edges of the triangles. Gives the set of all external edges in the triangulation. That is, all edges that have just one incident triangle. The set of all edges on the boundary of the triangulation. Project the triangulation from the x-y plane by the specified distance. The distance to project from the x-y plane. The projected triangulation. An indexed triangulation into a list of three dimensional vertices. The vertices of the triangulation. A list of triples of indices into the vertex array specifying each triangle. Constructs a triangulation given the underlying vertex and triangle index arrays. The vertex array. The triangle index array. Project the triangulation onto the x-y plane. The projected triangulation. Utilities for computing simple triangulations of polygons. A triangle with three vertices specified by indices. The indexed edge from to . The indexed edge from to . The indexed edge from to . Returns whether or not this is the canonical orientation of the polygon. We define the canonical form to be the one where A is minimum, and break ties by where B is minimum. Whether or not this triangle is in the canonical orientation. Constructs a permutation of the triangle vertices by shuffling them all to their left, so A takes the value of B, B of C, and C of A. The permuted triangle. Triangulates a star polygon with supplied kernel using only its perimeter vertices. Operates by finding the pair of triangles that contain the edge from the kernel to some vertex. If the quad formed by this pair of triangles is convex, then we are able to flip its triangulation to clip an ear and remove the vertex from the polygon. The perimeter vertices of the star polygon in counterclockwise order around the kernel. A central point that has line of sight to every perimeter vertex. An indexed triangulation of the polygon int . Returns an equivalent triangulation with any unused or duplicate vertices removed. The original triangulation. The reduced triangulation. Returns an equivalent triangulation with any unused vertices removed. The original triangulation. The reduced triangulation. Computes a new triangle array for the polygon given by triangulation, but containing no internal vertices. Vertices are also considered internal if their incident external edges are collinear. The vertex array of the original triangulation. The indexed triangle array of the original triangulation. A simplified indexed triangle array into . Simplifies the given triangulation by removing all internal and/or unused vertices. Internal vertices includes those vertices where their incident external edges are collinear. The original triangulation. The simplified triangulation. Simplifies the given triangulation by removing all internal and/or unused vertices. Internal vertices includes those vertices where their incident external edges are collinear. The original triangulation. The simplified triangulation. Projects a from the x-y plane by some distance along the y-axis. Note that the ground plane in Unity World Space is x-z, not x-y. The original vector. The projected vector. Projects a collection of s from the x-y plane by some distance along the y-axis. Note that the ground plane in Unity World Space is x-z, not x-y. The original vectors. The projected vectors. Projects a onto the x-y plane and converts it to a . The original vector. The projected vector. Projects a collection of s onto the x-y plane to get an array of s. The original vectors. The projected vectors. Projects a from the x-y plane by some distance along the z-axis. Note that the ground plane in Unity World Space is x-z, not x-y. The original vector. The distance to project along the z-axis. The projected vector. Projects a collection of s from the x-y plane by some distance along the z-axis. Note that the ground plane in Unity World Space is x-z, not x-y. The original vectors. The distance to project along the z-axis. The projected vectors. Checks the provided Vector3s for equality, treating NaN == NaN as equality. This matches the behaviour of Vector3.Equals in Unity 2018_4 but not Unity 2019_2. The first vector to compare. The second vector to compare. Whether the two are equal. Returns the left-hand perpendicular vector to a vector. Vector2 to find perpendicular vector to. Left perpendicular vector. Returns the right-hand perpendicular vector to a vector. Vector2 to find perpendicular vector to. Right perpendicular vector. Returns true if the two given vectors are close, defined by a given squared distance. The first vector. The second vector. The maximum squared magnitude of the difference between two vectors that are considered similar. True if the squared distance between the two vectors is less than the given epsilon. Returns whether a collection of vectors contains any vector similar to a given vector. Vectors A and B are considered similar if Magnitude(A-B) is less than the supplied epsilon The collection of vectors to test against. The vector to test. The maximum squared magnitude of the difference between two vectors that are considered similar. If the collection contains a vector similar to the test vector. Interface for a hierarchy of processes that can be cancelled, and will in turn cancel their sub-processes. This is to allow to have a collection of children that don't share the same type parameter. Cancels this and its children. Adds a child that should be cancelled if this is cancelled. Child cancellable object. Waits for this and its children to be done. It is implicit that coroutines should wait for child routines that they care about the result of to be done before returning. This method is useful for tests. Interface for an injectable coroutine-friendly clock. Suspends coroutine execution for the given number of seconds. Number of seconds to wait. Returns the current timestamp. Utility methods for constructing instances compatible with base map features. Create a new instance for applying a uniform color to base map features. Returns *null* if the necessary shaders cannot be loaded (e.g. if they were not included in the Unity project the application was built from). Color of material. Base map compatible instance with the specified color, or null if the necessary shaders cannot be loaded. Finds a shader by name; or, if that shader can't be found, logs a warning and finds a fallback shader instead. Name of the shader to find. Name of the fallback shader. If the fallback shader can't be found. Utilities for doing matrix calculations with 2D arrays of doubles. Constructs and returns an by identity matrix. Matrix dimension. An by identity matrix. Converts a 1D double array to a 2D row vector matrix (a 1 x N matrix). 1D vector to convert. 2D row vector matrix form. Converts a 1D double array to a 2D column vector matrix (an N x 1 matrix). 1D vector to convert. 2D column vector matrix form. Computes the matrix product of a pair of matrices stored as 2D arrays of doubles. The left hand matrix. The right hand matrix. The product of and . Thrown when and are of incompatible sizes. Swaps rows and of . If and are equal, does nothing. A matrix. Row index. Row index. Swaps columns and of . If and are equal, does nothing. A matrix. Column index. Column index. Multiplies the specified of by . The matrix to mutate. The index of the row to scale. The coefficient to multiply by. Adds a multiple of row to row of . The matrix to mutate. The row to mutate. The row to add to row . The coefficient for Performs Gaussian Elimination (https://en.wikipedia.org/wiki/Gaussian_elimination) with full pivoting. Solves systems of linear equations of the form AX = B for X given A and B. The determinant of A is computed as a side effect. Runs in O(N^3) An N by N matrix A. An N by M matrix B. The determinant of A, which is zero if no solution exists. The solution X such that AX = B, or null if no solution exists. When the given matrices are the wrong shape. Computes the matrix inverse of , or null if none exists. Matrices must be square to be invertible. The inverse of an N x N matrix is another N x N matrix such that their product is the identity matrix, I. The determinant of is computed as a side effect. The matrix to compute the inverse of. The determinant of , which is zero if is not invertible. The inverse of , or null if is not invertible. Thrown when is not square. Fake request for use in testing. Fake request factory for use in testing. All requests created by this factory. Returns the next enqueued request. Returns the next enqueued request. Enqueue a request (usually FakeRequest) to return in a createPostRequest call. Factory for creating network requests. Creates a new GET network request. URL. Request headers. Request timeout in seconds. Creates a new POST network request. URL. Request body data. Request headers. Request timeout in seconds. A convenience class for dealing with loop break lists (arrays of indices) such as VertexBreaks in . Provides an index iterator that monitors the array of loop breaks and provides IsLoopStart and IsLoopEnd predicates. Loop breaks, indicating indices that correspond to the start of a loop. The 0 index is implied, but may be explicitly included. The upper bound (inclusive) of the iterator. The current iterator value. Initialised to -1 before iteration begins. A value equal to indicates the iterator is exhausted. Index into the array of the start of the next loop that starts at a value greater than or equal to . If CurrentValue is not at the start of a loop, this will refer to the start of the next loop. When the iterator moves past the first index of a loop, this value is updated to refer to the start of the next loop. Initially, CurrentValue == -1, and BreaksIndex == 0. Create a new iterator using the supplied breaks array. The maximum value returned by this iterator. An array of indices, each corresponding to the start of a loop. Optional parameter indicating whether to take a local copy of the breaks array. Defaults to false, so the original breaks array is used, requiring that the array not be modified while the iterator is being used. Allows iterator to be used in foreach loops. This object is its own IEnumerator. Reference to this object Moves the iterator to the next value while updating the field if necessary. If the current iterator value corresponds to the start of a loop break, is incremented to refer to the next loop break start. False if the iterator is exhausted. Resets the iterator. Apparently only used for COM interoperability in DotNet. Returns the current value in a type safe way. Returns whether the iterator's current value refers to the first index of a loop. Returns whether the iterator's current value refers to the last of a loop. General guard function to prevent the iterator being used in an invalid state, e.g., before the iterator has moved to the first item, or after the iterator is exhausted. If iterator value undefined. A factory for creating Unity GameObjects from Areas. A shared cache used to minimise the number of created materials. A helper object for building a Mesh for Unity's . Register for finalizers. Default material. Constructor. Manager for sorting features.. Register for finalizers. Constructs a Unity Mesh from the specified Area and styling information. The mesh. Area containing geometry data. Constructs UV coordinates for the Area polygon. The UVs generated are of the following form: Channel 0: (x, y, width, height). (x, y) is the coordinates of each vertex relative to the bottom-left corner of the axis-aligned bounding box for the Area. (width, height) is the size of the bounding box. MeshBuilder constructing the area. A factory for creating Unity GameObjects from ExtrudedAreas. A helper object for building a Mesh for Unity's . Register for finalizers. The render order manager to use for game objects created by this factory. Constructor. Returns the collection of Materials to apply to an ExtrudedArea as determined from the supplied style, with wall material before roof material. If the same material is used for walls and roofs, a single material is returned. The style from which to determine materials An array of materials to apply to an ExtrudedArea Applies height styling options to extruded areas. An ExtrudedArea to adjust if necessary. The style from which to get the height styling options. The adjusted ExtrudedArea Applies a minimum height to the base level of the provided . An to adjust. The minimum height of the base level of the . Constructs a Unity Mesh from the specified ExtrudedArea and styling information. ExtrudedArea containing geometry data. The UV reference frame used to generate UV coordinates. Specified the index of the submesh to which the roof triangles will be added, allowing for ExtrudedAreas with a single material, or differing materials for roof and walls. Creates a new for the supplied shape either aligned to the direction of the shape (longest edge) or aligned to world space coordinates. The shape for which to create a UvSpace3D Whether to align to world space or shape direction. The UV coordinate space. Returns the direction of longest edge between two adjacent vertices. If the vertices are intended to represent a closed curve, the last vertex must be a copy of the first vertex. Vertices A Vector2 representing the longest edge direction. Adds a wall to the supplied mesh builder. The supplied vertices vStart2D and vEnd2D are assumed to be in anticlockwise winding order (so that the outward normal points to the right of the segment) and relative to the supplied origin. The initial vertex of the wall segment. The end vertex of the wall segment. The origin of the shape from which this wall is derived. The height to which the wall should extend downwards. The height of the top of the wall. The mesh to which the wall should be added. A factory for creating Unity GameObjects from s. Z-order to use for roads. Z-order to use for road borders. The maximum distance, as a multiple of half line width, that the outer point of a line corner can be from the center point of the join before the outer corner will be mitered. This value is slightly larger than 1 / sin(60), allowing corners up to 60 degrees to be un-mitered. A value used to limit a dot product in the corner inner point calculation expressed in multiples of the segment width. Default color assigned to segments when no styling material is provided. The render order manager to use for game objects created by this factory. A helper object for building a Mesh for Unity's . Register for finalizers. Constructor. Manager for sorting features. Register for finalizers. Constructor. Manager for sorting features. Register for finalizers. Default material assigned to segments when no styling material is provided. Verifies whether the provided can be used to construct a using . Line shape to verify. Constructs a Unity Mesh from the specified Line and styling information. In the event the provided has no material set, the mesh will be generated without UV coordinates. LineShape containing geometry data. Styling inforation. The width of the Line geometry to generate. Adds a semi-circular endcap to a mesh. Index into the mesh representing one of the vertices at the end of the road segment. The triangle v0, v1, (v0 + ) should have a clockwise winding order. Index into the mesh representing one of the vertices at the end of the road segment. The triangle v0, v1, (v0 + ) should have a clockwise winding order. Mesh builder to which vertices are added. UV space for working out UV coordinates. The center vertex of the endcap relative to the object center. An offset added to all generated vertices. Creates a 2D extrusion of the specified line, axis aligned with respect to the X and Z axes. MeshBuilder the vertices are constructed in. LineGroup to extrude. Width of the extrusion in meters. Represents an extrusion of a polyline. The polyline the extrusion was made from. The left side of the extrusion. The right side of the extrusion. The endcaps of the extrusion. Constructor. The polyline the extrusion was made from. The left side of the extrusion. The right side of the extrusion. Extrudes the given polyline. The width of the extrusion in meters. The line to extrude. An offset added to all generated vertices. Whether to add an endcap to the start of the line. Whether to add an endcap to the end of the line. The extrusion of the line. Calculates the direction that each edge in the specified Line is pointing. An edge points from its first vertex to its second. The vertices that describe the Line. A factory for creating Unity GameObjects from ModelledVolumes. A helper object for building a Mesh for Unity's . Register for finalizers. Constructor. The render order manager to use for game objects created by this factory. Register for finalizers. The render order manager to use for game objects created by this factory. Static maths utils. This class doesn't use generics because .Net generics don't natively support arithmetic operators. Performs a bi-linear interpolation of the four provided values. The parameters exist on a square as follows: x1y1 x2y1 +----------------------+ | | | | | | | | | | yPercent | | | | | | | | | | | | xPercent | | |----------------+-----| | | | | | | +----------------------+ x1y2 x2y2 The top-left value to interpolate. The top-right value to interpolate. The bottom-left value to interpolate. The bottom-right value to interpolate. A value indicating how far to linearly interpolate horizontally, when between 0 and 1. When outside this range, a linear extrapolation is performed. A value indicating how far to linearly interpolate vertically, when between 0 and 1. when outside of this range, a linear extrapolation is performed. Clamps the given value to the closed interval [min, max]. Values less than min become min, values greater than max become max, and values in between min and max are unchanged. Value to clamp Minimum value Maximum value The clamped value Clamps the given value to the closed interval [min, max]. Values less than min become min, values greater than max become max, and values in between min and max are unchanged. Value to clamp Minimum value Maximum value The clamped value Wraps the given value into the half-open interval [min, max). For example, with an interval of [-180, 180), -190 becomes 170, 190 becomes -170, and 180 becomes -180. Value to wrap Minimum value Maximum value The wrapped value Wraps the given value into the half-open interval [min, max). For example, with an interval of [-180, 180), -190 becomes 170, 190 becomes -170, and 180 becomes -180. Value to wrap Minimum value Maximum value The wrapped value Returns the non-negative remainder of x / m. Returns the non-negative remainder of x / m. Constant for converting decimal degrees to radians (as expected by .NET trig functions). Constant for converting radians to decimal degrees. Inverse of . Network request that supports retrying on failure. Similar to WWW class but with support for retrying on failure and testing. Like WWW it is a coroutine. On completion the caller can access IsError, Error and Response variables. State the request is in. Initial state, before the coroutine has started. Network request is in flight. Waiting before retrying a failed request. Request is done, either because it finished successfully or it failed maxAttempts times. Maximum number of attempts to make before failing. Setting to 0 gives infinite attempts. Request timeout in seconds. Maximum random delay in seconds added to delaySeconds. The actual additional delay will be a random number between 0 and delayJitterSeconds. Delay in seconds to wait after a failed attempt. Doubles after every failed request. Additional random delay of up to delayJittersSeconds is added to delaySeconds. Maximum retry interval in seconds to wait after a failed attempt. Default value for . Default value for . Default value for . Default value of . Default initial value for . Default request header specifying the post data content type. Current attempt to send the request. Current state of the request. Current in-flight network request. Current coroutine that Unity should process before continuing. Request URL. The HTTP request method to use. Request body data. Request headers. Factory used to create individual network requests. Creates a POST request. URL. Request body data. Request headers. Null corresponds to using the x-protobuf header. The initial retry interval in seconds. The maximum retry interval in seconds. The maximum number of attempts to make. Request timeout in seconds. The maximum random extra delay in seconds. The created POST request. Creates a GET request. URL. Request headers. The initial retry interval in seconds. The maximum retry interval in seconds. The maximum number of attempts to make. Request timeout in seconds. The maximum random extra delay in seconds. The created GET request. Constructor. URL. The HTTP method to use. Request headers. The initial retry interval in seconds. The maximum retry interval in seconds. The maximum number of attempts to make. Request timeout in seconds. The maximum random extra delay in seconds. Request body data. Sets a fake request factory for use in tests. Base class for requests. Types of network requests available. Whether the network request is finished. Whether there was an error making the request. Only set when finished. Error message received in case of failure. Response received if successful. Response code received. In case of retries or redirects, this is the last response code received. Response headers received if successful. A wrapper around the UnityWebRequest object to help with testing. Should not be used by client code because it does not support retrying on failure. Use Request instead. State the request is in. Initial state, before the coroutine has started. Network request is in flight. Request is done. Current state of the request. Network request. Network request coroutine. Creates a new POST request. URL. Request headers. Request body data. Request timeout in seconds. A WwwRequest. Creates a new GET request. URL. Request headers. Request timeout in seconds. A WwwRequest. Constructor. URL. Request headers. Request body data. Request timeout in seconds. The request method to use. because it does not support retrying on failure. Use RequestFactory instead. Automatically builds a partial map from a finite integer domain to a finite integer codomain (both contiguous ranges) such that the mapping is order-preserving. The domain and codomain are specified by the user, but the image and the individual mappings are generated. When adding a new value, the map is extended if there is a free space in the codomain that allows order to be preserved. If not, existing inputs are remapped to accommodate the new value if possible. In this case is triggered. If the codomain is too small to accommodate the new value is thrown. Thrown when the codomain is completely exhausted. Binary tree node. Left child. Right child. Value. Constructor. Left child. Right child. Value. The minimum value in the codomain. The maximum value in the codomain. The current map. The root node of a binary tree containing all of the values in the domain. Arguments for . Triggered when previous mappings need to be remapped to accommodate a new value. Constructor. Ensure that there's a node corresponding to the given value in the binary tree rooted at the supplied node. Attempt to extend the map to accommodate a new value x. Adds a value to the domain of the map, changing the individual mappings as necessary. Tries to extend the map without changing any existing mappings. Triggers and returns false if existing mappings must be changed in order to accommodate the new value. Returns true otherwise. Throws if there is no room left in the codomain for another value. The value to add to the domain. Applies the map to a value. Throws if value doesn't exist in map. The value to apply the map to. The result of applying the map to the value. Populate the map such that it contains all of the specified values. Try to spread the values out to avoid future remappings. Triggers . Throws if the codomain is too small for the given values. A manual profiling class that collects timing data for named events. Can be used to track time used in selected code sections through the use of named counters. These counters record total time spent, and number of intervals measured. A report (string) may be generated giving the total time, average time and number of recorded intervals for each named timer. An injectable time provider type used to determine elapsed time since startup. The interval recording class. The name of the event whose timing is being profiled. The number of event intervals that have been recorded. The total, combined time taken by all recorded intervals. Returns the average elapsed time per recorded interval. Start time of the most recent, or current interval. Constructor The name of the constructed interval timer. Record the start of an interval. Record the end of an interval. An injectable provided of elapsed time since startup. May be used for testing, or to replace the default Time.realtimeSinceStartup with a more accurate or more appropriate time provider. Map from names to interval timers. Constructor using default time provider. Constructor using an injected time provider. Provider of real time since startup. Default time provider. Seconds since startup. Add a new, named timer to this Using a pre-existing timer name will cause all information from that existing timer to be thrown away, including any currently in progress timing interval. Name of the timer to add. Start recording an interval for the timer with the supplied name. must be called with the given name before timing can be performed. The name of the timer. Record the end of a timing interval for the timer with the supplied name. The name of the timer. Generates a string reporting the current state of all registered timers. A string containing the report. Realtime UTC clock. Whether returns the time in UTC. Constructor. Whether returns the time in UTC. Utilities for rendering to textures. that sets the active render target to a specific texture on disposal. to set as active on disposal. Constructor. to restore on disposal. Set the active render target to the specified and return an to restore the active render target to the previous value. to set as active render target. to restore the active render target to the previous value. A generic implementation of an A-star search algorithm. The node type of the graph over which searching is performed. A mapping from node to the estimated cost to reach the goal from that node. A delegate defining a metric for measuring the search cost between two nodes. The source node. The target node. A delegate for fetching the reachable neighbors for a given node. The node whose neighbors are returned. Find the optimal path from to using a standard A-Star search. See, e.g., https://en.wikipedia.org/wiki/A*_search_algorithm The maximum number of nodes that will be searched. The initial node. The goal node. A delegate that returns reachable neighbors of a node. A delegate returning the cost of moving from one node to another. Only needs to be accurate when source and destination nodes are neighbours. A delegate returning the heuristic estimate of moving from one node to another, used to estimate the cost of reaching the goal from any given node. Must be conservative. If left as the default null value will also be used as the heuristic. Optimal path from start to goal (inclusive) or null if no path exists. Utility methods for dictionaries. Given a dictionary that maps its keys to a set of values, this method adds the specified value to the set that the key maps to. If the provided key is not present in the dictionary, a new entry is added to the dictionary that maps the key to a new set containing the value. Dictionary to add value to. Key to add value against. Value to add to the set. Creates a dictionary that maps a sequence of items to themselves. Items to map to themselves. A simple real time tracker for benchmark logging. System stopwatch used to track timing. Constructor. Resets elapsed time counting. Returns the interval (in seconds) since last call to ElapsedInterval. Resets the interval measurement to zero. Number of seconds since last call. Logs the time elapsed since last call to LogTime or ElapsedInterval. String prepended to elapsed time value. A factory interface for creating Unity GameObjects from MapFeatureShapes. Constructs a new GameObject from the data specified in the provided MapFeatureShape. GameObject to attach a Mesh to. MapFeatureShape containing the geometry data. Styling object which controls the appearance of the generated GameObject. A mechanism for hooking *AssemblyReloadEvents.beforeAssemblyReload* that can be simulated for testing purposes. Dynamic interface to UnityEditor assembly. A delegate containing all the registered callbacks. Is registered with *UnityEditor.beforeAssemblyReload*? Initialize the instance Execute all registered callbacks. Registers a callback to be called immediately before assembly reload. Has no effect if the callback is already registered. Callback to be registered. Unregister a callback registered with . Has no effect if the callback is not registered. Callback to be unregistered. Simulate assembly reload. Close the instance. The upper closure of a set of types ordered by the (non-strict) subtype relation. The upper closure can be queried, e.g. for all subtypes of a given type within the closure. Node used to build a tree of the closure with links from a type its subtypes. The type associated with this node. The guids of the subtypes of the node's type. Constructor. The type associated with this node. A mapping from type guid to the associated type node. Enumerate all of the direct supertypes of a given type. This includes all of the direct supertypes, not just those contained in the upper closure. Add a new type to the set, while maintaining the upper closure. The type to add to the set. Enumerate all of the subtypes of a given type that are included in the upper closure. Utilities relating to . The minimum supported resolution for terrain mesh generation. A terrain mesh resolution must be a power of 2 + 1. The maximum supported resolution for terrain mesh generation. A terrain mesh resolution must be a power of 2 + 1. The minimum supported resolution for the base map texture. This is the composite texture used on the terrain when viewed from a distance greater than the base map distance, as defined in the terrain's object. Unity enforces a power-of-two square texture size for the base map texture. The minimum size that Unity allows is 16 pixels. The maximum supported resolution for the base map texture. This is the composite texture used on the terrain when viewed from a distance greater than the base map distance, as defined in the terrain's object. Unity enforces a power-of-two square texture size for the base map texture. The maximum size that Unity allows is 2048 pixels. The minimum supported resolution for the alpha map textures. The alpha map textures are used to mask different s on top of the terrain. Unity enforces a power-of-two square texture size for alpha map textures. The minimum size that Unity allows is 16 pixels. The maximum supported resolution for the alpha map textures. The alpha map textures are used to mask different s on top of the terrain. Unity enforces a power-of-two square texture size for alpha map textures. The maximum size that Unity allows is 2048 pixels. Returns a power of two + 1 mesh resolution for a terrain tile of the specified zoom level. The returned resolution is decided such that if a mesh of that resolution were applied to such a terrain tile, it would match the provided meters per point value as closely as possible. The desired distance between each point in meters. The resolution will be calculated to apply to tiles of this zoom level. Returns a power of two resolution for a base map texture to be applied to a terrain tile of the specified zoom level. The returned resolution is decided such that if a texture of that resolution were applied to such a terrain tile, it would match the provided meters per pixel value as closely as possible. The desired distance between each pixel in meters. The resolution will be calculated to apply to tiles of this zoom level. Returns a power of two resolution for an alpha map texture to be applied to a terrain tile of the specified zoom level. The returned resolution is decided such that if a texture of that resolution were applied to such a terrain tile, it would match the provided meters per pixel value as closely as possible. The desired distance between each pixel in meters. The resolution will be calculated to apply to tiles of this zoom level. Returns a power of two resolution for a terrain tile of the specified zoom level, The returned resolution is decided such that if a texture of that resolution were applied to such a terrain tile, it would match the provided meters per pixel value as closely as possible. The desired distance between each pixel in meters. The resolution will be calculated to apply to tiles of this zoom level. The minimum allowed resolution. The maximum allowed resolution. Used to indicate which side a neighboring tile adjoins. Used to indicate which corner a diagonally neighboring tile adjoins. Aligns a single side of a terrain tile to the specified neighbor. The altitudes to align. Which direction to align to. How many pixels into altitudes should be blended.tu The resolution of the altitude raster. The starting x position of the rectangle to blend. The ending x position of the rectangle to blend. The starting y position of the rectangle to blend. The ending y position of the rectangle to blend. The coordinate of the edge which is being blended (x coordinate when blending the left and right edges; y coordinate when blending the top or bottom edge.) The altitudes of the neighboring tile which we want to match. Align the corner of a tile to two adjacent neighbors at once. The altitudes to align. Which direction to align to. How many pixels into altitudes should be blended. The resolution of the altitude raster. The starting x position of the rectangle to blend. The ending x position of the rectangle to blend. The starting y position of the rectangle to blend. The ending y position of the rectangle to blend. The x coordinate of the horizontal boundary of this corner. The y coordinate of the vertical boundary of this corner. The altitudes of the horizontally neighboring tile which we want to match. The altitudes of the vertically neighboring tile which we want to match. Align the corner of a tile to a single diagonal neighbor. The altitudes to align. How many pixels into altitudes should be blended. The starting x position of the rectangle to blend. The ending x position of the rectangle to blend. The starting y position of the rectangle to blend. The ending y position of the rectangle to blend. The x coordinate of the horizontal boundary of this corner. The y coordinate of the vertical boundary of this corner. The altitude of the adjoining corner of the diagonally adjacent tile. Aligns the altitudes in the provided array with the altitudes in the neighboring tiles. The altitudes to align. The left (west) Terrain neighbor. The top left (northwest) Terrain neighbor. The top (north) Terrain neighbor. The top right (northeast) Terrain neighbor. The right (east) Terrain neighbor. The bottom right (sounteast) Terrain neighbor. The bottom (south) Terrain neighbor. The bottom left (southwest) Terrain neighbor. Finds the minimum and maximum height values in the Terrain tile within the minimal Terrain vertex covering for the specified . The minimum vertex covering is the minimum group of Terrain mesh vertices that must be considered to fully contain the supplied . For example: Terrain Grid +------+------+------+------+ | | | | | | | | | | | | | | | +------$------$------$------$ | | | | | | | +-------------+ | | | | | | | | +------$------$------$------$ | | | | | | | | | | |Bounds| | | | | | | | | | +------$------$------$------$ | | | | | | | | | +-------------+ | | | | | | +------$------$------$------$ All vertices marked with a $ represent the minimum covering of the Bounds contained within. The worldspace to constrain the search to. The tile to search. The minimum returned height from the tile. The maximum returned height from the tile. Utilities for working with s. Returns a in worldspace coordinates that exactly encloses the provided in the specified 's space. As objects are axis-aligned, this is not the same as doing a raw transform of the object itself. Rather, a new is created in worldspace that is exactly the right size to encapsulate the provided one. The returned itself will likely differ in size. Loads the UnityEditorProxy through reflection. Exception that will be thrown on failed reflection loads. Default constructor. Constructor with message Stub class to throw exceptions if UnityEditor functions are called in non-editor mode. Utility class to provide information about the running Unity player or editor. A Unity version. The major version number. The minor version number. Get the version of the running Unity player or editor. The version of the running Unity player or editor. Wrap a value so that it can be passed by reference. Type of value to wrap. This allows passing by reference to coroutines, since they can't have ref parameters. Wrapped value. Constructor. Value to be wrapped. This element has broad visibility (public, internal) only so that tests have access to it.