Skip to content

Commit 7c95cc7

Browse files
docs (style - PVP)
Resolving more white space issues.
1 parent 959ccef commit 7c95cc7

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

com.unity.netcode.gameobjects/Documentation~/components/Helpers/componentcontroller.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ The `ComponentController` can be:
66
- Used with `AttachableBehaviour` or independently for another purpose.
77
- Configured to directly or inversely follow the `ComponentController`'s current state.
88
- 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._
1110

1211
## Configuring
1312

@@ -21,7 +20,6 @@ A `ComponentController` can have one or more `ComponentEntry` entries in its **C
2120

2221
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.
2322

24-
2523
## Examples
2624

2725
### Independent Usage
@@ -60,15 +58,15 @@ public class DaisyChainedController : MonoBehaviour
6058
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:
6159

6260
- DaisyChainedController-A
63-
- Controller
61+
- Controller
6462
- Points to DaisyChainedController-B
6563
- DaisyChainedController-B
66-
- Controller
64+
- Controller
6765
- Points to DaisyChainedController-C
6866
- DaisyChainedController-C
69-
- Controller
67+
- Controller
7068

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.
7270

7371
### AttachableBehaviour Usage
7472

com.unity.netcode.gameobjects/Documentation~/components/foundational/networkbehaviour-synchronize.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ Now that you understand the general concept behind `NetworkBehaviour.OnSynchroni
103103

104104
_"When would you want to use `NetworkBehaviour.OnSynchronize`?"_
105105

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.
109109

110110
**Using a synchronized RPC driven field approach:**
111111

@@ -186,7 +186,7 @@ public class SimpleRpcState : NetworkBehaviour
186186

187187
/// <summary>
188188
/// Late joining clients will be synchronized
189-
/// to the most current m_ToggleState
189+
/// to the most current m_ToggleState.
190190
/// </summary>
191191
protected override void OnSynchronize<T>(ref BufferSerializer<T> serializer)
192192
{
@@ -201,7 +201,7 @@ public class SimpleRpcState : NetworkBehaviour
201201

202202
/// <summary>
203203
/// Synchronizes connected clients with the
204-
/// server-side m_ToggleState
204+
/// server-side m_ToggleState.
205205
/// </summary>
206206
/// <param name="stateIsSet"></param>
207207
[Rpc(SendTo.ClientsAndHost)]

0 commit comments

Comments
 (0)