Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

1.0.0-pre.5

Issue ID

NCCBUG-129

Regression

No

[NetCode] "ScenePlacedObjects contains the same GlobalObjectIdHash" error when instantiating multiple identical Prefabs

Package: Multiplayer Netcode for GameObjects

-

Reproduction steps:
1. Open attached project and scene "StartMenu"
2. You might need to setup port-forwarding on your machine and change the "Default_Ip" and "Default_Port" fields in Hierarchy window -> Menu Control -> Inspector window -> Menu Control component.
3. In Build Settings window, Build and Run for Standalone. Open two instances of the Player.
4. In Editor, enter Play Mode
5. In Game View, press the "Host LAN Game" button
6. In Hierarchy window, select DontDestroyOnLoad -> PlatformManager
7. In Inspector window, switch Platform Manager -> Platform to "Standalone" and press the "Reload platform" button
8. Make sure to do the following steps on both Players before proceeding to the next one.
9. In both instances of the Player, press the "Join LAN Game" button
10. In both instances of the Player, press the "Swap Platform" button
11. In both instances of the Player, press the "Ready" button
12. In any one Player instance, use WASD to navigate forward through the track, until the Countdown starts (note, one Instance may not accept A and D inputs)
13. Once Countdown ends, in Editor's Game View, press the "Return to Lobby" button.
14. Observe the Console window

Expected result: No errors
Actual result: "KartA01(Clone) tried to registered with ScenePlacedObjects which already contains the same GlobalObjectIdHash value <...>" error

Reproducible with: 1.0.0-pre.5 (2021.2.14f1, 2022.1.0b10)
Could not test with: 2019.4.36f1 (NetCode for GameObjects not available), 2020.3.30f1, 2022.2.0a7 (compilation errors break project)

Note:
When there is only one Client instance, the issue does not reproduce

  1. Resolution Note:

    This was more of a support issue than a bug.
    User was spawning NetworkObjects from within an in-scene placed NetworkObject during awake.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.