Skip to content

Commit 2ca7581

Browse files
committed
docs: updating docs for world.Unspawn
1 parent 5270646 commit 2ca7581

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

doc/docs/guides/game-objects/lifecycle.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ public class MyComponent : MonoBehaviour
102102
{
103103
Debug.Log($"The object {identity} was spawned on the server");
104104
}
105-
private void OnServerUnspawn(NetworkIdentity identity)
105+
private void OnServerUnspawn(uint netId, NetworkIdentity identity)
106106
{
107-
Debug.Log($"The object {identity} was unspawned on the server");
107+
Debug.Log($"The object {identity} (netId={netId}) was unspawned on the server");
108108
}
109109

110110
private void ClientStarted()
@@ -116,9 +116,9 @@ public class MyComponent : MonoBehaviour
116116
{
117117
Debug.Log($"The object {identity} was spawned on the client");
118118
}
119-
private void OnClientUnspawn(NetworkIdentity identity)
119+
private void OnClientUnspawn(uint netId, NetworkIdentity identity)
120120
{
121-
Debug.Log($"The object {identity} was unspawned on the client");
121+
Debug.Log($"The object {identity} (netId={netId}) was unspawned on the client");
122122
}
123123
}
124124
```

0 commit comments

Comments
 (0)