LinkedGameObjectMap Class

Namespace: Improbable.Gdk.SubscriptionsSource

Represents the mapping between SpatialOS entity IDs and linked GameObjects.


Constructors

LinkedGameObjectMap Source
LinkedGameObjectMap(EntityGameObjectLinker linker)

Initializes a new instance of the LinkedGameObjectMap class backed with the data from the specified EntityGameObjectLinker.

Parameters


Methods

GetLinkedGameObjects Source
IReadOnlyList<GameObject> GetLinkedGameObjects(EntityId entityId)

Gets the GameObjects that are linked to a given SpatialOS entity ID.

Returns:
A readonly list of the linked GameObjects or null if there are none linked.

Parameters
  • EntityId entityId : The entity ID to get GameObjects for.

TryGetLinkedGameObjects Source
bool TryGetLinkedGameObjects(EntityId entityId, out IReadOnlyList<GameObject> linkedGameObjects)

Tries to get the GameObjects that are linked to a given SpatialOS entity ID.

Returns:
True, if there are any GameObjects linked to the EntityId; otherwise false

Parameters
  • EntityId entityId : The entity ID to get GameObjects for.
  • out IReadOnlyList<GameObject> linkedGameObjects : When this method returns, contains the GameObjects linked to the specified EntityId, if any are linked; otherwise, null. This parameter is passed uninitialized.

Updated about a year ago


LinkedGameObjectMap Class


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.