diff --git a/Svelto.Common b/Svelto.Common index d0e0823..3f4ca87 160000 --- a/Svelto.Common +++ b/Svelto.Common @@ -1 +1 @@ -Subproject commit d0e08231b4464226b04c81b6a9aaaf5250200e36 +Subproject commit 3f4ca8771ed0698e9e573f97fdbf9cb00b4531d3 diff --git a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/DisposeJob.cs b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/DisposeJob.cs index 670241d..2ccc059 100644 --- a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/DisposeJob.cs +++ b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/DisposeJob.cs @@ -1,4 +1,4 @@ -#if UNITY_2019_2_OR_NEWER +#if UNITY_JOBS using System; using Unity.Jobs; diff --git a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/IJobifiedEngine.cs b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/IJobifiedEngine.cs index 80d35f9..ab091a9 100644 --- a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/IJobifiedEngine.cs +++ b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/IJobifiedEngine.cs @@ -1,4 +1,5 @@ -using Unity.Jobs; +#if UNITY_JOBS +using Unity.Jobs; namespace Svelto.ECS.Extensions.Unity { @@ -15,4 +16,6 @@ namespace Svelto.ECS.Extensions.Unity string name { get; } } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/JobifiedEnginesGroup.cs b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/JobifiedEnginesGroup.cs index 7186710..148d10e 100644 --- a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/JobifiedEnginesGroup.cs +++ b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/JobifiedEnginesGroup.cs @@ -1,4 +1,4 @@ -#if UNITY_2019_2_OR_NEWER +#if UNITY_JOBS using Svelto.Common; using Svelto.DataStructures; using Unity.Jobs; diff --git a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/SortedJobifiedEnginesGroup.cs b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/SortedJobifiedEnginesGroup.cs index f0c7546..7693866 100644 --- a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/SortedJobifiedEnginesGroup.cs +++ b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/SortedJobifiedEnginesGroup.cs @@ -1,4 +1,4 @@ -#if UNITY_2019_1_OR_NEWER +#if UNITY_JOBS using Svelto.DataStructures; using Unity.Jobs; using Svelto.Common; diff --git a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/UnityJobExtensions.cs b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/UnityJobExtensions.cs index 7d0df74..312c703 100644 --- a/Svelto.ECS/Extensions/Unity/DOTS/Jobs/UnityJobExtensions.cs +++ b/Svelto.ECS/Extensions/Unity/DOTS/Jobs/UnityJobExtensions.cs @@ -1,34 +1,10 @@ -#if UNITY_NATIVE +#if UNITY_JOBS using System; using Svelto.ECS.Extensions.Unity; using Unity.Jobs; namespace Svelto.ECS { -#if UNITY_JOBS - public static class UnityJobExtensions - { - public static JobHandle ScheduleParallel - (this JOB job, uint iterations, JobHandle inputDeps) where JOB: struct, IJobParallelForBatch - { - if (iterations == 0) - return inputDeps; - - var innerloopBatchCount = ProcessorCount.BatchSize((uint) iterations); - return job.ScheduleBatch((int)iterations, innerloopBatchCount, inputDeps); - } - - public static JobHandle ScheduleParallel - (this JOB job, int iterations, JobHandle inputDeps) where JOB: struct, IJobParallelForBatch - { - if (iterations <= 0) - return inputDeps; - - var innerloopBatchCount = ProcessorCount.BatchSize((uint) iterations); - return job.ScheduleBatch((int)iterations, innerloopBatchCount, inputDeps); - } - } -#endif public static class UnityJobExtensions2 { public static JobHandle ScheduleDispose diff --git a/Svelto.ECS/Svelto.ECS.asmdef b/Svelto.ECS/Svelto.ECS.asmdef index dc8a20f..b836337 100644 --- a/Svelto.ECS/Svelto.ECS.asmdef +++ b/Svelto.ECS/Svelto.ECS.asmdef @@ -49,14 +49,9 @@ "define": "UNITY_NATIVE" }, { - "name": "com.unity.jobs", - "expression": "", + "name": "Unity", + "expression": "2019.3.0", "define": "UNITY_JOBS" - }, - { - "name": "com.unity.jobs", - "expression": "", - "define": "UNITY_NATIVE" } ], "noEngineReferences": false diff --git a/Svelto.ECS/version.json b/Svelto.ECS/version.json new file mode 100644 index 0000000..f1745a8 --- /dev/null +++ b/Svelto.ECS/version.json @@ -0,0 +1,3 @@ +{ + "version": "3.1.0" +} diff --git a/package.json b/package.json deleted file mode 100644 index fc42eda..0000000 --- a/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "displayName": "Svelto ECS", - "category": "Svelto", - "description": "Svelto ECS C# Lightweight Data Oriented Entity Component System Framework", - "dependencies": { - "com.sebaslab.svelto.common": "3.0.2" - }, - "keywords": [ - "svelto" - ], - "name": "com.sebaslab.svelto.ecs", - "version": "3.0.3", - "type": "framework" - } diff --git a/version.json b/version.json deleted file mode 100644 index ff4ffa0..0000000 --- a/version.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "version": "3.0.3" -}