Sites

Menu

LinkedGameObjectMap Class

Namespace: Improbable.Gdk.Subscriptions
GDK package: Subscriptions
Source

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.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums