Photon Fusion
2.1.1
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.
| 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. |
| SnapshotNearest | The state is based on whether the interpolation alpha is above or below 0.5. Below 0.5 we use the previous snapshot, above 0.5 we use the 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. |