It's the 15th anniversary of Google Maps Platform - Check out the latest news and announcements

Google.Maps.Unity.MetadataRegister

A register for associating metadata objects with GameObjects.

Summary

Inheritance

Inherits from: MonoBehaviour

Public functions

AddMetadata(GameObject target, IMetadata metadataObj)
void
Add a metadata object to a given target object of type T.
GetGameObjectsByMetadataType< MT >()
IEnumerable< GameObject >
Enumerate all of the target objects containing one or more metadata objects of the given type. Respects subtyping.
GetMetadata< MT >(GameObject target)
IEnumerable< MT >
Enumerates all of the metadata objects of type MT that are associated with the given target object of type T. Respects subtyping.
RemoveMetadataByGameObject(GameObject target)
void
Remove all the metadata associated with the given game object.

Public functions

AddMetadata

void AddMetadata(
  GameObject target,
  IMetadata metadataObj
)

Add a metadata object to a given target object of type T.

Details
Parameters
target
The target object to which the metadata object should be added.
metadataObj
The metadata object.

GetGameObjectsByMetadataType< MT >

IEnumerable< GameObject > GetGameObjectsByMetadataType< MT >()

Enumerate all of the target objects containing one or more metadata objects of the given type. Respects subtyping.

Details
Template Parameters
MT
The type of metadata objects to enumerate.

GetMetadata< MT >

IEnumerable< MT > GetMetadata< MT >(
  GameObject target
)

Enumerates all of the metadata objects of type MT that are associated with the given target object of type T. Respects subtyping.

Details
Parameters
target
The target object for which to look for an associated metadata object.
Template Parameters
MT
The type of the metadata objects.

RemoveMetadataByGameObject

void RemoveMetadataByGameObject(
  GameObject target
)

Remove all the metadata associated with the given game object.