You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Documentation~/components/Helpers/componentcontroller.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,7 @@ The `ComponentController` can be:
6
6
- Used with `AttachableBehaviour` or independently for another purpose.
7
7
- Configured to directly or inversely follow the `ComponentController`'s current state.
8
8
- Configured to have an enable and/or disable delay.
9
-
-_When invoked internally by `AttachableBehaviour`, delays are ignored when an `AttachableNode` is being destroyed and the changes are immediate._
10
-
9
+
-_When invoked internally by `AttachableBehaviour`, delays are ignored when an `AttachableNode` is being destroyed and the changes are immediate._
11
10
12
11
## Configuring
13
12
@@ -21,7 +20,6 @@ A `ComponentController` can have one or more `ComponentEntry` entries in its **C
21
20
22
21
Both delay values (Enable & Disable) has many uses, but an example would be to prevent a `MeshRenderer` from being enabled prior to other specific events like avoiding it from rendering for a few frames while the attachable is positioned.
23
22
24
-
25
23
## Examples
26
24
27
25
### Independent Usage
@@ -60,15 +58,15 @@ public class DaisyChainedController : MonoBehaviour
60
58
The above component could be arranged to create a chained sequence of components when the root `DaisyChainedController` component is enabled or disabled. Such a sequence could look like:
61
59
62
60
- DaisyChainedController-A
63
-
- Controller
61
+
- Controller
64
62
- Points to DaisyChainedController-B
65
63
- DaisyChainedController-B
66
-
- Controller
64
+
- Controller
67
65
- Points to DaisyChainedController-C
68
66
- DaisyChainedController-C
69
-
- Controller
67
+
- Controller
70
68
71
-
When DaisyChainedController-A is enabled, then a sequence of events would occur where DaisyChainedController-B and DaisyChainedController-C would be enabled. The same sequence of events would occur when DaisyChainedController-A was then disabled.
69
+
When DaisyChainedController-A is enabled, then a sequence of events would occur where DaisyChainedController-B and DaisyChainedController-C would be enabled. The same sequence of events would occur when DaisyChainedController-A was then disabled.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Documentation~/components/foundational/networkbehaviour-synchronize.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,9 +103,9 @@ Now that you understand the general concept behind `NetworkBehaviour.OnSynchroni
103
103
104
104
_"When would you want to use `NetworkBehaviour.OnSynchronize`?"_
105
105
106
-
`NetworkVariable`s can be useful to synchronize state, but they also are only updated every network tick. While it is possible to adjust a `NetworkVariable`'s update frequency, `NetworkVariable`s (in general) guarantees state synchronization but does not guarantee state changes will be updated in the same order they were chanted relative to other `NetworkVariables`.
107
-
108
-
With this in mind, you might need states to be updated in the relative order in which they were changed. In order to do this, you can combine the use of an RPC to handle updating the change in a properties state/value while using `NetworkBehaviour.OnSynchronize` to assure that any late joining client will be synchronized with the current state of said property.
106
+
`NetworkVariable`s can be useful to synchronize state, but they also are only updated every network tick. While it is possible to adjust a `NetworkVariable`'s update frequency, `NetworkVariable`s (in general) guarantees state synchronization but does not guarantee state changes will be updated in the same order they were chanted relative to other `NetworkVariables`.
107
+
108
+
With this in mind, you might need states to be updated in the relative order in which they were changed. In order to do this, you can combine the use of an RPC to handle updating the change in a properties state/value while using `NetworkBehaviour.OnSynchronize` to assure that any late joining client will be synchronized with the current state of said property.
109
109
110
110
**Using a synchronized RPC driven field approach:**
111
111
@@ -186,7 +186,7 @@ public class SimpleRpcState : NetworkBehaviour
0 commit comments