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.MetadataRegisterCore< T >

Associate metadata objects with target objects.

Summary

Public functions

AddMetadata(T target, System.Object metadataObj)
void
Add a metadata object to a given target object of type T.
GetMetadata< MT >(T 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.
GetObjectsByMetadataType< MT >()
IEnumerable< T >
Enumerate all of the target objects containing one or more metadata objects of the given type. Respects subtyping.
RemoveMetadata(T target, System.Object metadataObj)
void
Remove a metadata object from a target object.
RemoveMetadataByGameObject(T target)
void
Clear all metadata for given target object.

Public functions

AddMetadata

void AddMetadata(
  T target,
  System.Object 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.

GetMetadata< MT >

IEnumerable< MT > GetMetadata< MT >(
  T 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.

GetObjectsByMetadataType< MT >

IEnumerable< T > GetObjectsByMetadataType< 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.

RemoveMetadata

void RemoveMetadata(
  T target,
  System.Object metadataObj
)

Remove a metadata object from a target object.

Details
Parameters
target
The target object to remove the metadata object from.
metadataObj
The metadata object to remove.
Exceptions
KeyNotFoundException
The target doesn't contain the given metadata object.

RemoveMetadataByGameObject

void RemoveMetadataByGameObject(
  T target
)

Clear all metadata for given target object.

Details
Parameters
target
Target to clear of metadata.