Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.9.1
2.0.0-exp.2
Issue ID
NCCBUG-234
Regression
No
The server is trying to spawn an additional GameObject when spawning a GameObject owned by the client
How to reproduce:
1. Open the “NetcodeRepro“ project
2. Open the “OutdoorScene“
3. Build and Run
4. In the Player click on the “Server“ button
5. Navigate back to the Editor
6. Enter the Play Mode
7. Open the “DontDestroyOnLoad > NetworkManager“ GameObject in the Inspector
8. Click on the “Start Client“ button in the Network Manager Component
9. Observe the Console window
Expected result: No warnings are thrown in the Console
Actual result: “Trying to spawn NetworkObjectId 2 that already exists!“ warning thrown in the Console
Reproducible with: 1.9.1 (2022.3.31f1, 6000.0.5f1), 2.0.0-exp.2 (6000.0.5f1)
Could not test with: 1.9.1 (2021.3.39f1) (Could not resolve the HDRP errors)
Reproducible on: macOS 13.5.2 (Intel), Windows 10 (User’s)
Not reproducible on: No other environments tested
Notes: The issue also reproduces when both client and server are opened from the Player
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- 2D Light Textures show the lights of any 'blend style' index higher than theirs (if present) when they aren't visible by the Camera using Render Graph
- [SpeedTree] Wireframe mode not rendering correctly ST assets
- Light2D affecting only the Default Sorting Layer will also affect any Custom Lit Sprite not on that Layer when using Render Graph
- Decals do not get projected onto a GameObject draw with the Render Objects Renderer Feature when according to Event it should be projected
- The Depth value is not being written correctly in the Scene view when the Full Screen Pass Renderer Feature is applied on a GameObject with the Render Object Feature
Resolution Note:
Remove the portion of the player script that has the server spawn the player object when the player object is spawned as this is done automatically for you. The reason it is complaining about the object being spawned twice is that it is being spawned again on the server side when the player prefab is automatically spawned in the Player script.
If you want to spawn a custom network prefab per player, review over the Changing the player Prefab section in the NGO documentation.