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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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.