Sites

Menu

EntitySnapshot Struct

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

A snapshot of a SpatialOS entity.


Methods

GetComponentSnapshot<T> Source
T? GetComponentSnapshot<T>()

Gets the SpatialOS component snapshot if present.

Returns:
The component snapshot, if it exists, or null otherwise.

Type parameters:
  • T : The component type.
TryGetComponentSnapshot<T> Source
bool TryGetComponentSnapshot<T>(out T snapshot)

Attempts to get the SpatialOS component if present.

Returns:
True, if the component exists; false otherwise.

Parameters
  • out T snapshot : When this method returns, this will be the component if it exists, default constructed otherwise.

Type parameters:
  • T : The component type.
AddComponentSnapshot<T> Source
void AddComponentSnapshot<T>(T component)

Adds a component to this snapshot.

Parameters
  • T component : The component to add.

Notes:
  • Will override any pre-existing component in the snapshot.

Type parameters:
  • T : The component type.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums