Change detector for a NetworkBehaviour More...
Classes | |
struct | Enumerable |
Struct representing a collection of changes detected in a NetworkBehaviour. More... | |
struct | Enumerator |
Enumerator for the collection of changes detected in a NetworkBehaviour. More... | |
Public Types | |
enum class | Source |
Enum representing the source of a NetworkBehaviour's state. More... | |
Public Member Functions | |
Enumerable | DetectChanges (NetworkBehaviour b, bool copyChanges=true) |
Detects changes in a NetworkBehaviour and returns an Enumerable of the changes. More... | |
Enumerable | DetectChanges (NetworkBehaviour b, out NetworkBehaviourBuffer previous, out NetworkBehaviourBuffer current, bool copyChanges=true) |
Detects changes in a NetworkBehaviour and returns an Enumerable of the changes. More... | |
void | Init (NetworkBehaviour networkBehaviour, Source source, bool copyInitial=true) |
Initializes the ChangeDetector for a given NetworkBehaviour. More... | |
Change detector for a NetworkBehaviour
This class is used to detect changes in a NetworkBehaviour. It can be used to detect changes in a NetworkBehaviour between two snapshots, or between the current state and a snapshot.
|
strong |
Enum representing the source of a NetworkBehaviour's state.
Enumerator | |
---|---|
SimulationState | The state is the current simulation state of the NetworkBehaviour. |
SnapshotFrom | The state is from a previous snapshot of the NetworkBehaviour. |
SnapshotTo | The state is from a future snapshot of the NetworkBehaviour. |
Enumerable DetectChanges | ( | NetworkBehaviour | b, |
bool | copyChanges = true |
||
) |
Detects changes in a NetworkBehaviour and returns an Enumerable of the changes.
b | The NetworkBehaviour instance to detect changes in. |
copyChanges | Whether to copy the changes detected. Defaults to true. |
Enumerable DetectChanges | ( | NetworkBehaviour | b, |
out NetworkBehaviourBuffer | previous, | ||
out NetworkBehaviourBuffer | current, | ||
bool | copyChanges = true |
||
) |
Detects changes in a NetworkBehaviour and returns an Enumerable of the changes.
b | The NetworkBehaviour instance to detect changes in. |
previous | The previous state of the NetworkBehaviour. |
current | The current state of the NetworkBehaviour. |
copyChanges | Whether to copy the changes detected. Defaults to true. |
void Init | ( | NetworkBehaviour | networkBehaviour, |
Source | source, | ||
bool | copyInitial = true |
||
) |
Initializes the ChangeDetector for a given NetworkBehaviour.
networkBehaviour | The NetworkBehaviour instance to initialize the ChangeDetector for. |
source | The source of the NetworkBehaviour's state. |
copyInitial | Whether to copy the initial state of the NetworkBehaviour. Defaults to true. |