NOTICE: Google Maps Platform gaming services is deprecated as of October 18, 2021. Current users will have continued access until December 31, 2022. During this time, we will continue to provide support and fixes to major bugs and outages. See the Gaming Services Transition Guide for resources to help you plan the next steps for your projects.

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

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

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.