Skip to content

Commit

Permalink
UPM package version 3.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow authored Mar 18, 2023
1 parent d62e331 commit a08d12b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Core/EnginesRoot.Engines.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion Core/EntityViewUtility.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Svelto.DataStructures;
using Svelto.ECS.Hybrid;
using Svelto.ECS.Internal;
using Svelto.Utilities;

Expand Down
10 changes: 6 additions & 4 deletions Extensions/Unity/DOTS/UECS/DOTSOperationsForSvelto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public void AddComponentBatched<T>(NativeArray<Entity> DOTSEntities)
_EManager.AddComponent<T>(DOTSEntities);
}

//can't support publicly the version without DOTSSveltoEGID now
[MethodImpl(MethodImplOptions.AggressiveInlining)]
NativeArray<Entity> CreateDOTSEntityFromSveltoBatched(Entity prefab, (uint rangeStart, uint rangeEnd) range,
ExclusiveGroupStruct groupID, NB<DOTSEntityComponent> DOSTEntityComponents)
Expand All @@ -197,7 +196,8 @@ NativeArray<Entity> CreateDOTSEntityFromSveltoBatched(Entity prefab, (uint range
_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,
Expand All @@ -219,17 +219,19 @@ public NativeArray<Entity> CreateDOTSEntityFromSveltoBatched(Entity prefab, (uin
{
var count = (int)(range.rangeEnd - range.rangeStart);

//DOTS entities track Svelto entities through this component
_EManager.AddComponent<DOTSSveltoEGID>(nativeArray);

var SetDOTSSveltoEGIDJob = new SetDOTSSveltoEGID
//set the DOTSSveltoEGID values
var setDOTSSveltoEGIDJob = new SetDOTSSveltoEGID
{
sveltoStartIndex = range.rangeStart,
createdEntities = nativeArray,
entityManager = _EManager,
ids = sveltoIds,
groupID = groupID
};
creationJob = *_jobHandle = JobHandle.CombineDependencies(*_jobHandle, SetDOTSSveltoEGIDJob.ScheduleParallel(count, default));
creationJob = *_jobHandle = JobHandle.CombineDependencies(*_jobHandle, setDOTSSveltoEGIDJob.ScheduleParallel(count, default));

return nativeArray;
}
Expand Down
2 changes: 1 addition & 1 deletion Extensions/Unity/DOTS/UECS/SveltoOnDOTSCreationEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface ISveltoOnDOTSStructuralEngine

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();
Expand Down
7 changes: 6 additions & 1 deletion Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
/// </summary>
[Sequenced(nameof(JobifiedSveltoEngines.SveltoOnDOTS))]
Expand All @@ -39,6 +39,11 @@ enginesRoot.scheduler is SimpleEntitiesSubmissionScheduler
/// for the user to add pure DOTS ECS SystemBase/ISystem systems to the DOTS ECS world
/// </summary>
public World world { get; private set; }

/// <summary>
/// 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
/// </summary>
public ISveltoOnDOTSSubmission submitter => _sveltoDotsEntitiesSubmissionGroup;

public JobHandle Execute(JobHandle inputDeps)
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,12 @@ https://github.com/sebas77/Svelto.ECS/discussions

**Practical articles**

* [Svelto.ECS 3.4 – Svelto On DOTS ECS update](https://www.sebaslab.com/svelto-ecs-3-4-svelto-on-dots-ecs-update/)
* [Svelto.ECS 3.3 and the new Filters API](https://www.sebaslab.com/svelto-ecs-3-3-and-the-new-filters-api/)
* [Svelto.ECS Internals: How to avoid boxing when using structs with reflection](https://www.sebaslab.com/casting-a-struct-into-an-interface-inside-a-generic-method-without-boxing/)
* [Svelto ECS 3.0 Internals: profiling the Entity Collection](https://www.sebaslab.com/svelto-ecs-3-0-internals-the-entity-collection/)
* [Svelto ECS 3.0 Internals: Support Native Memory Natively](https://www.sebaslab.com/svelto-ecs-3-0-internals-support-native-memory-natively/)
* [Svelto MiniExamples: GUI and Services Layer with Unity](https://www.sebaslab.com/svelto-miniexamples-gui-and-services-layer/)
* [What’s new in Svelto.ECS 3.0](https://www.sebaslab.com/whats-new-in-svelto-ecs-3-0/)
* [Svelto MiniExample 7: Stride Engine demo](https://www.sebaslab.com/svelto-miniexample-7-stride-engine-demo/)
* [Svelto Mini Examples: The Unity Survival Example](https://www.sebaslab.com/the-new-svelto-ecs-survival-mini-example/)
* [Svelto Mini (Unity) Examples: Doofuses Must Eat](https://www.sebaslab.com/svelto-mini-examples-doofuses-must-eat/)
* [Svelto Mini Examples: The Unity Survival Example](http://www.sebaslab.com/learning-svelto-ecs-by-example-the-unity-survival-example/)
* [Learning Svelto.ECS by example – The Vanilla Example](http://www.sebaslab.com/learning-svelto-ecs-by-example-the-vanilla-example/)
* [Porting a boid simulation from UnityECS/Jobs to Svelto.ECS/Tasks](https://www.sebaslab.com/porting-a-boid-simulation-from-unityecs-to-svelto-ecs/)
* [Svelto.ECS+Tasks to write Data Oriented, Cache Friendly, Multi-Threaded code](http://www.sebaslab.com/svelto-ecs-svelto-tasks-to-write-data-oriented-cache-friendly-multi-threaded-code-in-unity/)
Expand All @@ -162,10 +161,10 @@ Note: I included the IoC articles just to show how I shifted over the years from

**Svelto Community Extensions**

* [Svelto.ECS inspector](https://github.com/akrogame/svelto-ecs-inspector)
* [Svelto.ECS.Schema - Schema and State Machine extensions for Svelto.ECS](https://github.com/cathei/Svelto.ECS.Schema)
* [Being able to swap entities between a subset of compound tags to another subset of compound tags](https://gist.github.com/jlreymendez/c2f441aaf6ac7b5f233ecd990314e9cc)
* [Automatic way to control svelto engines order without having to pass in a string using attributes](https://gist.github.com/dragonslaya84/88e6bb998eda8fe4ee912f01d67feec9)
* [***Svelto.ECS inspector***](https://github.com/akrogame/svelto-ecs-inspector)
* [***Svelto.ECS.Schema - Schema and State Machine extensions for Svelto.ECS***](https://github.com/cathei/Svelto.ECS.Schema)
* [***Being able to swap entities between a subset of compound tags to another subset of compound tags***](https://gist.github.com/jlreymendez/c2f441aaf6ac7b5f233ecd990314e9cc)
* [***Automatic way to control svelto engines order without having to pass in a string using attributes***](https://gist.github.com/dragonslaya84/88e6bb998eda8fe4ee912f01d67feec9)


## How to clone the repository:
Expand Down Expand Up @@ -210,7 +209,7 @@ Best option is to fork and clone [https://github.com/sebas77/Svelto.ECS.Tests](h
Hey, thanks a lot for considering this. You can help in several ways. The simplest is to talk about Svelto.ECS and spread the word, the more we are, the better it is for the community. Then you can help with the documentation, updating the wiki or writing your own articles. Svelto.ECS has all the features needed to make a game with the ECS pattern, but some areas are lacking: *A visual debugger and more unit tests are needed*. Other platforms other than Unity could get some love too: Stride Game, Godot, monogame, FNA or whatever supports c#. Porting to other languages, especially c++, would be awesome but probably pointless. Please check the lane dedicated to the community tasks list here: https://github.com/users/sebas77/projects/3 and let me know if you want to take something on!

## Svelto Framework is used to develop the following products\(\*\):
![Robocraft 2](https://user-images.githubusercontent.com/945379/185896584-6a38d0de-1765-4d55-a4a5-d5785adb0eaa.png)
![Robocraft](https://user-images.githubusercontent.com/945379/225630614-20dbdf8e-2d7f-48d5-8e04-39e6d43a43ab.png)
![Techblox](https://user-images.githubusercontent.com/945379/123062411-65ee3600-d404-11eb-8dca-d30c28ed909d.png)
![Gamecraft](https://user-images.githubusercontent.com/945379/163145452-3e8d959a-1453-4373-8010-38bb7717f79e.png)
![Robocraft Infinity](https://user-images.githubusercontent.com/945379/163145385-7635f193-b69b-4508-a391-f41a3331122c.png)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"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",
"ecs",
"svelto.ecs"
],
"name": "com.sebaslab.svelto.ecs",
"version": "3.4.2",
"version": "3.4.3",
"type": "library",
"unity": "2020.3"
}

0 comments on commit a08d12b

Please sign in to comment.