Entities 1.2.3, Netcode for Entities 1.2.3
On the server I’m spawning a prefab containing a parent and a child. The parent has a ghost authoring component, set to predicted (if set to interpolated, there is no error). The child also has a ghost authoring component (settings do not matter).
Here’s the error
ArgumentException: An EntityManager command is operating on an invalid entity. This usually means that the Entity has already been destroyed or was never created. This can happen when a subscene is opened or closed between when a EntityCommandBuffer has been recorded and played back. This can invalidate recorded Entities. Entity(457:1) was previously destroyed by system Unity.Entities.BeginSimulationEntityCommandBufferSystem in world AClientWorld. This command was requested from system Unity.NetCode.PredictedGhostSpawnSystem.
Unity.Entities.EntityComponentStore.AssertEntitiesExist (Unity.Entities.Entity* entities, System.Int32 count) (at ./Library/PackageCache/com.unity.entities@1.2.3/Unity.Entities/EntityComponentStoreDebug.cs:315)
Unity.Entities.EntityStorageInfoLookup.get_Item (Unity.Entities.Entity entity) (at ./Library/PackageCache/com.unity.entities@1.2.3/Unity.Entities/Iterators/EntityStorageInfoLookup.cs:126)
Unity.NetCode.GhostPredictionDisableSimulateSystem+TogglePredictedJob.Execute (Unity.Entities.ArchetypeChunk& chunk, System.Int32 unfilteredChunkIndex, System.Boolean useEnabledMask, Unity.Burst.Intrinsics.v128& chunkEnabledMask) (at ./Library/PackageCache/com.unity.netcode@1.2.3/Runtime/Snapshot/GhostPredictionSystemGroup.cs:69)
Unity.NetCode.GhostPredictionDisableSimulateSystem+TogglePredictedJob.Unity.Entities.IJobChunk.Execute (Unity.Entities.ArchetypeChunk& chunk, System.Int32 unfilteredChunkIndex, System.Boolean useEnabledMask, Unity.Burst.Intrinsics.v128& chunkEnabledMask) <0x2470848e1d0 + 0x00072> in <128051a7d453428ea710933a9a4e80dd>:0
Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].ExecuteInternal (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at ./Library/PackageCache/com.unity.entities@1.2.3/Unity.Entities/IJobChunk.cs:420)
Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].Execute (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at ./Library/PackageCache/com.unity.entities@1.2.3/Unity.Entities/IJobChunk.cs:363)
Instantiation code
Entity creature = state.EntityManager.Instantiate(_creaturePrefabComponent.Value);
public struct CreaturePrefabComponent : IComponentData
{
public Entity Value;
}
Attaching screenshots of the prefab contruction


