Skip to content

Commit 4f61564

Browse files
Apply suggestions from code review
Co-authored-by: Amy Reeve <amy.reeve@unity3d.com>
1 parent f7cbdf3 commit 4f61564

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

com.unity.netcode.gameobjects/Documentation~/basics/scenemanagement/inscene-placed-networkobjects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ public class MyInSceneNetworkObjectBehaviour : NetworkBehaviour
186186
187187
### Pre-disabled in-scene placed NetworkObjects
188188

189-
If you want to always have an in-scene placed NetworkObject start off as disabled and then spawn it at a later time, you only need to set its GameObject to inactive in the editor while the respective scene is open. Once you have started a networked session, you can re-enable it and then spawn it any time.
189+
To initialize an in-scene placed NetworkObject in a disabled state and spawn it later, set its GameObject to inactive in the Editor while the respective scene is open. Once a networked session begins, you can re-enable and spawn it at any time.
190190

191191
### Setting an in-scene placed NetworkObject to a despawned state when instantiating
192192

193-
If you want to programmatically disable an in-scene placed NetworkObject you can add some additional code in the `OnNetworkSpawn` part of a NetworkBehaviour component:
193+
To programmatically disable an in-scene placed NetworkObject, add some additional code in the `OnNetworkSpawn` part of a NetworkBehaviour component:
194194

195195
```csharp
196196
using UnityEngine;

com.unity.netcode.gameobjects/Documentation~/components/core/networkobject.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,28 @@ You can use [NetworkBehaviours](networkbehaviour.md) to add your own custom Netc
2222
### What is a valid NetworkObject?
2323

2424
There are two categories of NetworkObjects:
25-
* Dynamically intantiated
25+
* Dynamically instantiated
2626
* [In-scene placed](../../basics/scenemanagement/inscene-placed-networkobjects.md)
2727

2828
The following provides the validity requirements for both types.
2929

30-
#### Dynamically instantiated network prefabs.
30+
#### Dynamically instantiated network prefabs
3131

32-
Requirements
32+
Dynamically instantiated network prefabs must:
3333

34-
* It must be a valid [network prefab](./networkobject.md#network-prefabs) created within the editor.
35-
* It must be registered within a network prefab list that is assigned to your NetworkManager.
34+
* Be a valid [network prefab](./networkobject.md#network-prefabs) created within the Editor.
35+
* Be registered in a network prefab list that's assigned to your NetworkManager.
3636

37-
#### In-scene placed
37+
#### In-scene placed network prefabs
3838

39-
Requirements
39+
In-scene placed network prefabs must:
4040

41-
* It can be a valid network prefab instance within a scene.
42-
* It can be a GameObject with a `NetworkObject` component created within the scene while in the editor.
41+
* Be a valid network prefab instance within a scene.
42+
* Be a GameObject with a NetworkObject component created within the scene while in the Editor.
4343

4444
### What is an invalid NetworkObject?
4545

46-
Any GameObjects that have `NetworkObject` components added to them during runtime is **not supported** and will result in the NetworkObject's `GlobalObjectIdHash` being zero which would eventually result in synchronization issues. In the event you make this mistake, a warning message will be logged and the NetworkObject will not get spawned.
46+
GameObjects that have NetworkObject components added to them during runtime are **not supported** and will result in the NetworkObject's `GlobalObjectIdHash` being zero, which causes synchronization issues. In the event you make this mistake, a warning message will be logged and the NetworkObject won't be spawned.
4747

4848
### Component order
4949

0 commit comments

Comments
 (0)