Skip to content

Commit 8ad7a82

Browse files
docs(style-pvp)
Removing trickier white spaces...
1 parent cc04caf commit 8ad7a82

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

com.unity.netcode.gameobjects/Documentation~/TableOfContents.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* [Network components](network-components.md)
2222
* [Foundational Components](components/foundational/foundationalcomponents.md)
2323
* [NetworkObject](components/foundational/networkobject.md)
24-
* [NetworkObject parenting](advanced-topics/networkobject-parenting.md)
24+
* [NetworkObject parenting](advanced-topics/networkobject-parenting.md)
2525
* [NetworkBehaviour](components/foundational/networkbehaviour.md)
2626
* [Synchronizing & Order of Operations](components/foundational/networkbehaviour-synchronize.md)
2727
* [NetworkManager](components/foundational/networkmanager.md)
@@ -43,11 +43,11 @@
4343
* [Spawning synchronization](basics/spawning-synchronization.md)
4444
* [Deferred despawning](basics/deferred-despawning.md)
4545
* [Latency and performance](latency-performance.md)
46-
* [Understanding latency](learn/lagandpacketloss.md)
47-
* [Ticks and update rates](learn/ticks-and-update-rates.md)
48-
* [Improving performance with client-side interpolation](learn/clientside-interpolation.md)
49-
* [Client anticipation](advanced-topics/client-anticipation.md)
50-
* [Dealing with latency](learn/dealing-with-latency.md)
46+
* [Understanding latency](learn/lagandpacketloss.md)
47+
* [Ticks and update rates](learn/ticks-and-update-rates.md)
48+
* [Improving performance with client-side interpolation](learn/clientside-interpolation.md)
49+
* [Client anticipation](advanced-topics/client-anticipation.md)
50+
* [Dealing with latency](learn/dealing-with-latency.md)
5151
* [Network synchronization](network-synchronization.md)
5252
* [Synchronizing states and events](advanced-topics/ways-to-synchronize.md)
5353
* [NetworkVariables](networkvariables-landing.md)

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ This is simple enough for many scenarios, but can become cumbersome under more s
2020
With attaching, a user would create nested `GameObject` children that represent the item when it is picked up and when it is dropped/placed somewhere in the scene (i.e. world).<br />
2121
![alt text](../../images/attachable/PlayerAndWorldItem-1.png)
2222

23-
- The WorldItemRoot is where the `NetworkObject` component is placed.
24-
- The NestedChild-World contains the components needed for the item when it is placed in the world.
25-
- The NestedChild-PickedUp contains the components needed for the item when it is picked up by a player.
23+
- The WorldItemRoot is where the `NetworkObject` component is placed.
24+
- The NestedChild-World contains the components needed for the item when it is placed in the world.
25+
- The NestedChild-PickedUp contains the components needed for the item when it is picked up by a player.
2626

2727
By placing an `AttachableBehaviour` component on the NestedChild-PickedUp `GameObject` and an `AttachableNode` component on the TargetNode, a user can then invoke the `AttachableBehaviour.Attach` method while passing in the `AttachableNode` component and the NestedChild-PickedUp `GameObject` will get parented under the TargetNode while also synchronizing this action with all other clients.<br />
2828
![alt text](../../images/attachable/PlayerAndWorldItem-2.png)
@@ -65,7 +65,6 @@ The `ComponentController` provides this type of functionality:
6565
- Each assigned component entry can be configured to directly or inversely follow the `ComponentController`'s current state.
6666
- Each assigned component entry can have an enable and/or disable delay.
6767
- _When invoked internally by `AttachableBehaviour`, delays are ignored when an `AttachableNode` is being destroyed and the changes are immediate._
68-
6968
The `ComponentController` could be daisy chained with minimal user script:
7069
```csharp
7170
/// <summary>
@@ -123,7 +122,6 @@ This diagram has a bit more detail to it and introduces one possible usage of a
123122

124123
![alt text](../../images/attachable/AttachableDiagram-2.png)
125124

126-
127125
In the diagram above, we see arrows pointing from the `ComponentController` to the non-netcode standard Unity components such as a `MeshRenderer`, `Collider`, or any other component that should only be enabled when either in "World View" or "Attached View" modes. We can also see that the `AttachableBehaviour` points to the `ComponentController` with a diagram to the right that shows the `AttachableBehaviour` notifies the `ComponentController` that, in turn, enables or disables certain components.
128126

129127
#### World Item Component Controller
@@ -157,9 +155,9 @@ The above diagram represents what the **Player** and **World Item** spawned obje
157155
**AttachableBehaviour & NetworkObject Relationship**
158156

159157
Upon a `NetworkObject` component being spawned, all associated `NetworkBehaviour` based component instances, that are directly attached to the `NetworkObject`'s `GameObject` or are on any child `GameObject`, will be registered with the `NetworkObject` instance. This remains true even when a child `GameObject` containing one or more `NetworkBehaviour` based component instances of a spawned `NetworkObject` is parented, during runtime, under another `GameObject` that is associated with a different spawned `NetworkObject`. Of course, there are additional considerations like:
160-
- What happens when one or both of the NetworkObjects is de-spawned?
161-
- How do you assure the child attachable will return back to its default parent?
162-
- and several other edge case scenarios...
158+
- What happens when one or both of the NetworkObjects is de-spawned?
159+
- How do you assure the child attachable will return back to its default parent?
160+
- and several other edge case scenarios...
163161

164162
`AttachableBehaviour` leverages from this "spawn lifetime" relationship to provide another type of "parenting" (attaching) while also taking into consideration these types of edge case scenarios.
165163
:::

0 commit comments

Comments
 (0)