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 | 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. | |
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. | |
void | Init (NetworkBehaviour networkBehaviour, Source source, bool copyInitial=true) |
Initializes the ChangeDetector for a given NetworkBehaviour. | |
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.
enum Source |
Enum representing the source of a NetworkBehaviour's state.
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. |