diff --git a/com.sebaslab.svelto.common b/com.sebaslab.svelto.common index ff24942..0c123ed 160000 --- a/com.sebaslab.svelto.common +++ b/com.sebaslab.svelto.common @@ -1 +1 @@ -Subproject commit ff24942680a5e5d257541ed857a140e62525fe45 +Subproject commit 0c123edc4b74ff8d2c2be79b8f64ce9e996f856a diff --git a/com.sebaslab.svelto.ecs/Core/EnginesRoot.Engines.cs b/com.sebaslab.svelto.ecs/Core/EnginesRoot.Engines.cs index 3b7ba58..a25c40c 100644 --- a/com.sebaslab.svelto.ecs/Core/EnginesRoot.Engines.cs +++ b/com.sebaslab.svelto.ecs/Core/EnginesRoot.Engines.cs @@ -1,5 +1,5 @@ #if PROFILE_SVELTO && DEBUG -#warning the global define PROFILE_SVELTO should be used only when it's necessary to profile in order to reduce the overhead of debug code. Normally remove this define to get insights when errors happen +#warning the global define PROFILE_SVELTO should be used only when it's necessary to profile in order to reduce the overhead of debug code. While debugging remove this define to get insights when errors happen #endif using System; diff --git a/com.sebaslab.svelto.ecs/Core/EntityViewUtility.cs b/com.sebaslab.svelto.ecs/Core/EntityViewUtility.cs index b1f7355..f16645e 100644 --- a/com.sebaslab.svelto.ecs/Core/EntityViewUtility.cs +++ b/com.sebaslab.svelto.ecs/Core/EntityViewUtility.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using Svelto.DataStructures; -using Svelto.ECS.Hybrid; using Svelto.ECS.Internal; using Svelto.Utilities; diff --git a/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/DOTSOperationsForSvelto.cs b/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/DOTSOperationsForSvelto.cs index 61ef366..d166bbc 100644 --- a/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/DOTSOperationsForSvelto.cs +++ b/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/DOTSOperationsForSvelto.cs @@ -177,7 +177,6 @@ namespace Svelto.ECS.SveltoOnDOTS _EManager.AddComponent(DOTSEntities); } - //can't support publicly the version without DOTSSveltoEGID now [MethodImpl(MethodImplOptions.AggressiveInlining)] NativeArray CreateDOTSEntityFromSveltoBatched(Entity prefab, (uint rangeStart, uint rangeEnd) range, ExclusiveGroupStruct groupID, NB DOSTEntityComponents) @@ -197,7 +196,8 @@ namespace Svelto.ECS.SveltoOnDOTS _EManager.AddSharedComponentData(nativeArray[i], new DOTSSveltoGroupID(groupID)); } #endif - + //Set Svelto DOTSEntityComponent dotsEntity field to the DOTS entity + //Svelto entities track the DOTS entities through this component var setDOTSEntityComponentsJob = new SetDOTSEntityComponents { sveltoStartIndex = range.rangeStart, @@ -219,9 +219,11 @@ namespace Svelto.ECS.SveltoOnDOTS { var count = (int)(range.rangeEnd - range.rangeStart); + //DOTS entities track Svelto entities through this component _EManager.AddComponent(nativeArray); - var SetDOTSSveltoEGIDJob = new SetDOTSSveltoEGID + //set the DOTSSveltoEGID values + var setDOTSSveltoEGIDJob = new SetDOTSSveltoEGID { sveltoStartIndex = range.rangeStart, createdEntities = nativeArray, @@ -229,7 +231,7 @@ namespace Svelto.ECS.SveltoOnDOTS ids = sveltoIds, groupID = groupID }; - creationJob = *_jobHandle = JobHandle.CombineDependencies(*_jobHandle, SetDOTSSveltoEGIDJob.ScheduleParallel(count, default)); + creationJob = *_jobHandle = JobHandle.CombineDependencies(*_jobHandle, setDOTSSveltoEGIDJob.ScheduleParallel(count, default)); return nativeArray; } diff --git a/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSCreationEngine.cs b/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSCreationEngine.cs index 0f4ef4b..0695e9d 100644 --- a/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSCreationEngine.cs +++ b/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSCreationEngine.cs @@ -11,7 +11,7 @@ namespace Svelto.ECS.SveltoOnDOTS string name { get; } - //use case is i.e. to create archetypes once + //use case is i.e. to create DOTS archetypes once void OnOperationsReady(); //use case is i.e. to operate once per submission on entities just created void OnPostSubmission(); diff --git a/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs b/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs index cc51747..7e8d09f 100644 --- a/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs +++ b/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs @@ -20,7 +20,7 @@ namespace Svelto.ECS.SveltoOnDOTS /// Submission of Entities to be executed /// Svelto Add/Remove callbacks to be called /// ISveltoOnDOTSStructuralEngine to be executed - /// DOTS ECS engines to executed + /// DOTS ECS engines to be executed /// Synchronizations engines to be executed (DOTS ECS To Svelto) /// [Sequenced(nameof(JobifiedSveltoEngines.SveltoOnDOTS))] @@ -39,6 +39,11 @@ namespace Svelto.ECS.SveltoOnDOTS /// for the user to add pure DOTS ECS SystemBase/ISystem systems to the DOTS ECS world /// public World world { get; private set; } + + /// + /// for the user to be able to explicitly submit entities. When SveltoOnDOTS is used, you must use this way, you cannot + /// submit entities directly from the EnginesRoot submission scheduler + /// public ISveltoOnDOTSSubmission submitter => _sveltoDotsEntitiesSubmissionGroup; public JobHandle Execute(JobHandle inputDeps) diff --git a/com.sebaslab.svelto.ecs/package.json b/com.sebaslab.svelto.ecs/package.json index 8678c97..0ad09cd 100644 --- a/com.sebaslab.svelto.ecs/package.json +++ b/com.sebaslab.svelto.ecs/package.json @@ -11,7 +11,7 @@ "url": "https://github.com/sebas77/Svelto.ECS.git" }, "dependencies": { - "com.sebaslab.svelto.common": "3.4.0" + "com.sebaslab.svelto.common": "3.4.1" }, "keywords": [ "svelto", @@ -19,7 +19,7 @@ "svelto.ecs" ], "name": "com.sebaslab.svelto.ecs", - "version": "3.4.2", + "version": "3.4.3", "type": "library", "unity": "2020.3" } diff --git a/com.sebaslab.svelto.ecs/version.json b/com.sebaslab.svelto.ecs/version.json index 826968e..4c49bb1 100644 --- a/com.sebaslab.svelto.ecs/version.json +++ b/com.sebaslab.svelto.ecs/version.json @@ -1,3 +1,3 @@ { - "version": "3.4.2" + "version": "3.4.3" }