Search Issue Tracker
Won't Fix
Votes
11
Found in [Package]
1.6.0
Issue ID
NCCBUG-216
Regression
No
The GlobalObjectIdHash on the NetworkObject component is different from its prefab when the prefab is put into the hierarchy
Reproduction steps:
1. Open the attached “ASDQWE” project
2. Open the “Assets/Scenes/MainMenu.unity” Scene
3. Build and run the Player (File > Build And Run)
4. Inside the Player, press the “Is Server” Button
5. Inside the Editor, enter the Play Mode
6. Inside the Game View, press the “Is Client” Button
7. Observe the Console Window
Expected result: No error is thrown
Actual result: “[Netcode] NetworkPrefab hash was not found! In-Scene placed NetworkObject soft synchronization failure for Hash: 3844675318!" and “[Netcode] Failed to spawn NetworkObject for Hash 3844675318" errors are thrown
Reproducible with: 1.5.1 (2021.3.30f), 1.5.2 (2022.3.8f1), 1.6.0 (2023.1.11f1, 2023.2.0b7, 2023.3.0a3)
Reproducible on: Intel macOS 13.5
Not reproducible on: No other environment tested
-
MKark
Nov 02, 2023 07:29
I should add that the GlobalObjectIdHash is different between
- prefab in editor
- prefab in scene
- runtime object on the dedicated server (Linux) -
MKark
Nov 02, 2023 07:09
Same here. It happened after an update to 2023.1.17 with Netcode for GO 1.6.
All of the affected NetworkObjects have the same parent.
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
- C# Script Help button leads to missing documentation
- Root GameObject behaves differently when blending animations with and without keyframes and using AnimationPlayable
- Crash on D3D12GetInterface when reopening a specific project
- Crash on D3D12RayTracingShaderRuntimeData::GatherRayTracingGlobalInputBuffers when opening a specific project
- [HDRP] Pathtracer still shows sun disk through transparent object even when there's no sky
Resolution Note:
Hi,
We have reviewed the issue carefully, and in this case it is a misconfiguration.
- When the user clicks the Client Button in the MainMenu scene, it loads the GameLoader scene and then invokes a method upon the scene being loaded. The GameLoader scene contains two network prefab instances (CLIENT, SERVER).
- When the GameLoader scene is done loading, the StartClientAsync method deletes the SERVER network prefab instance. It invokes the NetworkManager.StartClient
- It then immediately deletes the SERVER network prefab on the client side after that.
- The client receives the Synchronization event from the server, which will include synchronization information for the SERVER network prefab instance.
- The client throws a soft-synch error...because the SERVER prefab no longer exists (it was just deleted prior to getting the synchronization message).
This will result in the client connecting with no soft synchronization errors.