EntitySnapshot Struct

Namespace: Improbable.Gdk.CoreSource

A snapshot of a SpatialOS entity.


Static Methods

Empty Source
EntitySnapshot Empty()


Constructors

EntitySnapshot Source
EntitySnapshot(params ISpatialComponentSnapshot[] snapshots)

Parameters


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.


Overrides

ToString Source
override string ToString()

Updated about a year ago


EntitySnapshot Struct


Suggested Edits are limited on API Reference Pages

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