How to reproduce:
1. Download the attached “IN-147142” project
2. Unzip and duplicate the project
3. Open both projects
4. Open the "SampleScene" in both projects
5. Ensure the PlayMode Type is set to 'Server' in one project and 'Client' in the other
6. Enter Play mode in both projects
7. Observe the crash
Reproducible with: 6000.3.18f1
Reproduced on: Windows 11 (user reported)
Note: This issue was not reproduced by CQA
First few lines of the stack trace:
Unity.Entities.EntityComponentStore.AssertEntitiesExist (Unity.Entities.Entity* entities, System.Int32 count) (at D:/dev/netcode-broken-ghost-prefab-3/Library/PackageCache/com.unity.entities@95352e4aa61e/Unity.Entities/EntityComponentStoreDebug.cs:315)
Unity.Entities.EntityComponentStore.GetArchetype (Unity.Entities.Entity entity) (at D:/dev/netcode-broken-ghost-prefab-3/Library/PackageCache/com.unity.entities@95352e4aa61e/Unity.Entities/EntityComponentStore.cs:1166)
Unity.Entities.EntityManager.Instantiate (Unity.Entities.Entity srcEntity) (at D:/dev/netcode-broken-ghost-prefab-3/Library/PackageCache/com.unity.entities@95352e4aa61e/Unity.Entities/EntityManager.cs:3517)
Unity.NetCode.GhostSpawnSystem.SpawnGhost (Unity.Entities.SystemState& state, Unity.Entities.Entity predictedEntity, System.Int32 type, Unity.Collections.NativeArray`1[T] prefabs) (at ./Library/PackageCache/com.unity.netcode@c5c09913fd21/Runtime/Snapshot/GhostSpawnSystem.cs:99)
Unity.NetCode.GhostSpawnSystem.TrySpawnFromDelayedQueue (Unity.Entities.SystemState& state, Unity.NetCode.GhostSpawnSystem+DelayedSpawnGhost& ghost, Unity.NetCode.GhostSpawnBuffer+Type spawnType, Unity.Collections.NativeArray`1[Unity.NetCode.GhostCollectionPrefab]& prefabs, Unity.Entities.Entity ghostCollectionSingleton, Unity.Entities.Entity& entity) (at ./Library/PackageCache/com.unity.netcode@c5c09913fd21/Runtime/Snapshot/GhostSpawnSystem.cs:339)