Search Issue Tracker
Fixed in 0.5.0-preview.5
Votes
0
Found in [Package]
0.3.0-preview.3
Issue ID
1279664
Regression
Yes
[NetCode] InvalidOperationException is thrown in build when scripting backend is set to IL2CPP
Reproduction steps:
1. Open attached project "Case_1279664"
2. Click File -> Build Settings... and check "Development Build"
3. Build and Run the project
4. Observe the Build's Console
Expected result: no errors are thrown
Actual result: "InvalidOperationException: Unexpected 0 hash for type" is thrown twice
Reproducible with: 0.3.0-preview.3, 0.4.0-preview.1 (2020.1.10f1, 2020.2.0b8, 2021.1.0a2)
Not reproducible with: 2018.4.28f1 (NetCode not available) 2019.4.13f1 (Reproducible package version not available)
Full Exception:
InvalidOperationException: Unexpected 0 hash for type
at Unity.NetCode.GhostCollectionSystem.HashGhostComponentSerializer (Unity.NetCode.LowLevel.Unsafe.GhostComponentSerializer+State& comp) [0x00000] in <00000000000000000000000000000000>:0
at Unity.NetCode.GhostCollectionSystem.AddSerializer (Unity.NetCode.LowLevel.Unsafe.GhostComponentSerializer+State state) [0x00000] in <00000000000000000000000000000000>:0
at Unity.NetCode.Generated.GhostComponentSerializerRegistrationSystem.OnCreate () [0x00000] in <00000000000000000000000000000000>:0
at Unity.Entities.ComponentSystemBase.CreateInstance (Unity.Entities.World world) [0x00000] in <00000000000000000000000000000000>:0
at Unity.Entities.World.AddSystem_OnCreate_Internal (Unity.Entities.ComponentSystemBase system) [0x00000] in <00000000000000000000000000000000>:0
at Unity.Entities.World.GetOrCreateSystemsAndLogException (System.Collections.Generic.IEnumerable`1[T] types, System.Int32 typesCount) [0x00000] in <00000000000000000000000000000000>:0
at Unity.Entities.DefaultWorldInitialization.AddSystemToRootLevelSystemGroupsInternal (Unity.Entities.World world, System.Collections.Generic.IEnumerable`1[T] systemTypesOrig, System.Int32 managedTypesCountOrig) [0x00000] in <00000000000000000000000000000000>:0
at Unity.Entities.DefaultWorldInitialization.Initialize (System.String defaultWorldName, System.Boolean editorWorld) [0x00000] in <00000000000000000000000000000000>:0
Unity.Entities.World:GetOrCreateSystemsAndLogException(IEnumerable`1, Int32)
Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal(World, IEnumerable`1, Int32)
Unity.Entities.DefaultWorldInitialization:Initialize(String, Boolean)
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note (fix version 0.5.0-preview.5):
Fixed in: Unity NetCode 0.5.0 - preview.5