ArgumentException: It is not allowed to have two components of the same type on the same entity. (DamagedData and DamagedData)
Closed this issue · 1 comments
After replaced all spawn cooldawn to 1 i found this exception inside swarm of monsters
ArgumentException: It is not allowed to have two components of the same type on the same entity. (DamagedData and DamagedData) EntityCommandBuffer was recorded in EnemyAttackingSystem and played back in Unity.Entities.EndFrameBarrier. at Unity.Entities.ArchetypeManager.AssertArchetypeComponents (Unity.Entities.ComponentTypeInArchetype* types, System.Int32 count) [0x0007a] in X:\private\bretwalda\github\SurvivalShooterECS\SurvivalShooterECS\Library\PackageCache\com.unity.entities@0.0.12-preview.21\Unity.Entities\ArchetypeManager.cs:347 at Unity.Entities.ArchetypeManager.CreateArchetypeInternal (Unity.Entities.ComponentTypeInArchetype* types, System.Int32 count, Unity.Entities.EntityGroupManager groupManager) [0x00001] in X:\private\bretwalda\github\SurvivalShooterECS\SurvivalShooterECS\Library\PackageCache\com.unity.entities@0.0.12-preview.21\Unity.Entities\ArchetypeManager.cs:465 at Unity.Entities.ArchetypeManager.GetOrCreateArchetype (Unity.Entities.ComponentTypeInArchetype* types, System.Int32 count, Unity.Entities.EntityGroupManager groupManager) [0x00020] in X:\private\bretwalda\github\SurvivalShooterECS\SurvivalShooterECS\Library\PackageCache\com.unity.entities@0.0.12-preview.21\Unity.Entities\ArchetypeManager.cs:395 at Unity.Entities.EntityDataManager.AddComponent (Unity.Entities.Entity entity, Unity.Entities.ComponentType type, Unity.Entities.ArchetypeManager archetypeManager, Unity.Entities.SharedComponentDataManager sharedComponentDataManager, Unity.Entities.EntityGroupManager groupManager, Unity.Entities.ComponentTypeInArchetype* componentTypeInArchetypeArray) [0x000c1] in X:\private\bretwalda\github\SurvivalShooterECS\SurvivalShooterECS\Library\PackageCache\com.unity.entities@0.0.12-preview.21\Unity.Entities\EntityDataManager.cs:861 at Unity.Entities.EntityManager.AddComponent (Unity.Entities.Entity entity, Unity.Entities.ComponentType type) [0x00018] in X:\private\bretwalda\github\SurvivalShooterECS\SurvivalShooterECS\Library\PackageCache\com.unity.entities@0.0.12-preview.21\Unity.Entities\EntityManager.cs:387 at Unity.Entities.EntityCommandBuffer.PlaybackChain (Unity.Entities.EntityManager mgr, Unity.Entities.ECBSharedPlaybackState& playbackState, Unity.Collections.NativeArray[T] chainStates, System.Int32 currentChain, System.Int32 nextChain) [0x002a3] in X:\private\bretwalda\github\SurvivalShooterECS\SurvivalShooterECS\Library\PackageCache\com.unity.entities@0.0.12-preview.21\Unity.Entities\EntityCommandBuffer.cs:971 at Unity.Entities.EntityCommandBuffer.Playback (Unity.Entities.EntityManager mgr) [0x00252] in X:\private\bretwalda\github\SurvivalShooterECS\SurvivalShooterECS\Library\PackageCache\com.unity.entities@0.0.12-preview.21\Unity.Entities\EntityCommandBuffer.cs:872 at Unity.Entities.BarrierSystem.FlushBuffers (System.Boolean playBack) [0x00045] in X:\private\bretwalda\github\SurvivalShooterECS\SurvivalShooterECS\Library\PackageCache\com.unity.entities@0.0.12-preview.21\Unity.Entities\ComponentSystem.cs:667 Unity.Entities.BarrierSystem.FlushBuffers (System.Boolean playBack) (at Library/PackageCache/com.unity.entities@0.0.12-preview.21/Unity.Entities/ComponentSystem.cs:688) Unity.Entities.BarrierSystem.OnUpdate () (at Library/PackageCache/com.unity.entities@0.0.12-preview.21/Unity.Entities/ComponentSystem.cs:641) Unity.Entities.ComponentSystem.InternalUpdate () (at Library/PackageCache/com.unity.entities@0.0.12-preview.21/Unity.Entities/ComponentSystem.cs:375) Unity.Entities.ScriptBehaviourManager.Update () (at Library/PackageCache/com.unity.entities@0.0.12-preview.21/Unity.Entities/ScriptBehaviourManager.cs:77) Unity.Entities.ScriptBehaviourUpdateOrder+DummyDelagateWrapper.TriggerUpdate () (at Library/PackageCache/com.unity.entities@0.0.12-preview.21/Unity.Entities/ScriptBehaviourUpdateOrder.cs:703)
Thank you! I believe the latest set of commits should fix these.