Skip to content

Commit cc04caf

Browse files
docs (style-PVP)
Removing white space at the end of lines.
1 parent 741b42b commit cc04caf

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
* [Max players](basics/maxnumberplayers.md)
1919
* [Transports](advanced-topics/transports.md)
2020
* [Relay](relay/relay.md)
21-
* [Network components](network-components.md)
21+
* [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)

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ With attaching, a user would create nested `GameObject` children that represent
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)
2929

30-
### AttachableBehaviour
30+
### AttachableBehaviour
3131

3232
![alt text](../../images/attachable/AttachableBehaviour_InspectorView-1.png)
3333

@@ -52,7 +52,7 @@ The simplest component in the bunch, this provides a valid connection point (_i.
5252

5353
![alt text](../../images/attachable/ComponentController_InspectorView-1.png)
5454

55-
Taking the above example into consideration, it would make sense that a user would want to be able to easily control whether a specific component is enabled or disabled when something is attached or detached.
55+
Taking the above example into consideration, it would make sense that a user would want to be able to easily control whether a specific component is enabled or disabled when something is attached or detached.
5656

5757
As an example:
5858

@@ -65,7 +65,7 @@ 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-
68+
6969
The `ComponentController` could be daisy chained with minimal user script:
7070
```csharp
7171
/// <summary>
@@ -111,7 +111,7 @@ For example purposes, we will walk through a common scenario where you might wan
111111

112112
![alt text](../../images/attachable/AttachableDiagram-1.png)
113113

114-
#### Player
114+
#### Player
115115

116116
The player prefab in the above diagram is not complete, includes the components of interest, and some additional children and components for example purposes. A complete diagram would most definitely have additional components and children. The `AttachableNode` components provide a "target attach point" that any other spawned network prefab with an `AttachableBehaviour` could attach itself to.
117117

@@ -151,16 +151,15 @@ We can see the `AttachableBehaviour`'s **Component Controllers** list contains `
151151

152152
![alt text](../../images/attachable/AttachableDiagram-3.png)
153153

154-
The above diagram represents what the **Player** and **World Item** spawned objects (_including cloned/non-authority instances_) would look like once the **Attached View** object has been parented under the avatar's **Right Attach** object. The green area and arrow represent the still existing relationship that the **Attached View** has with the **World Item**'s `NetworkObject`.
154+
The above diagram represents what the **Player** and **World Item** spawned objects (_including cloned/non-authority instances_) would look like once the **Attached View** object has been parented under the avatar's **Right Attach** object. The green area and arrow represent the still existing relationship that the **Attached View** has with the **World Item**'s `NetworkObject`.
155155

156156
:::info
157157
**AttachableBehaviour & NetworkObject Relationship**
158158

159159
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:
160160
- 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?
161+
- How do you assure the child attachable will return back to its default parent?
162162
- and several other edge case scenarios...
163163

164164
`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.
165-
:::
166-
165+
:::

0 commit comments

Comments
 (0)