What's next aka Entitas 2.0
What's next
Some of you might have seen it in the Entitas gitter chat already, but to be more transparent I will share here again.
I'm currently modernizing the DesperateDevs libraries that are used by Entitas and Jenny. This will result in some breaking changes, but hopefully for the good. This is my plan:
- update the complete codebase to the latest .Net 4.x and C# 7.x version
- use the new csproj layout
- updating the complete codebase to follow the official Microsoft C# naming conventions
- leverage the power of async await and multithreading
- add even more unit test
- add a benchmark project to ensure best performance
I've already had a lot of great moments refactoring and updating the code. Generally the result was less code and better performance, e.g. the Jenny code generator is now multithread is super fast.
Once everything is updated I will also modernize Entitas following the same plan. This means there will be breaking changes in the generated code because of the Microsoft C# naming conventions. I will also drop support for older .Net like 3.5 and focus on upcoming versions. With all the new internal changes and breaking changes I will bump the version to 2.0
Plans for Entitas
The following is subject to change: I plan to drop support for the reflection based code generator and doubling down on roslyn one because it's more powerful. I will explore the idea of including it to the GitHub version, so everyone can enjoy Jenny right from the start. I also have a personal set of custom code generator for Unity like Asset management, localization, configuration and more and plan to include them by default or create a separate Jenny-Plugins repo for that, so everyone can share their set of custom generators. That means the GitHub version will probably evolve to have the same feature set as the Asset Store version. The only difference will probably be that with the GitHub version there will be a limit on how much code you can generate but you can unlock unlimited code genration with the Asset Store invoice.
Ladies and gentlemen, this is a good time to start picking a bottle of champagne for the occasion.
What's your approximate timeline, if you have one? End of the summer? Fall? Christmas?
The only difference will probably be that with the GitHub version there will be a limit on how much code you can generate but you can unlock unlimited code generation with the Asset Store invoice.
I like your plans for going forward with Entitas. I also understand that you want to be able to monetize the project, but I really think that limiting code generation is a bad idea and it will push people away to different solutions.
Is there any update for the ETA?
@buihuuloc Not 100% sure yet, I'm currently reorganising my schedules to be able to regularly block time for Entitas development. 2 - 4 months might be realistic
Sounds like a good timeline for a Halloween sale. Do they celebrate that in Europe?
I like your plans for going forward with Entitas. I also understand that you want to be able to monetize the project, but I really think that limiting code generation is a bad idea and it will push people away to different solutions.
Not if you think of it as a free trial.
sounds good!
Hello, bumping this to see if there have been any updates on Entitas 2.0? I like the Entitas API and accompanying code generation, but this project seems inactive although very stable and functional. I wouldn't mind forking it and building on it myself, but the code generation source isn't present and would take a significant amount of time to replace. Thanks for your time!
This all sounds good and I look forward to it.
If by "Microsoft C# naming conventions" you mean making it so member variables start with a capital letter (MyComponent instead of myComponent) I'm glad to hear that. But you could just make that a setting in the editor to make it easier for existing users to migrate.
leverage the power of async await and multithreading
Will this also give us the ability to easily use PLINQ (Parallel.ForEach etc.)? That would be good.
Any updates?
If Entitas isn't updated before I finish my current project, I will use something else for my next one.
I shifted a few things around and should be able to have time to work on Entitas again in approx 4 weeks! Really looking forward!
Change of plans to be more active and commit more regularly:
I will go back to smaller incremental releases, which will make it simpler to actually do changes, make sure there's always a version that builds and also makes it easier for everyone to update.
More background info: One of the reasons that prevented me from releasing the last months was an all-or-nothing approach. I wanted to do too much at the same time which prevented me from being able to build and forced me to complete everything to 100%. This is obviously not ideal. I did spend the time and got a lot done, but since I'm not 100% done, I cannot release. Combine this with being highly involved in my main job, this led to no apparent progress.
Change of plans to be more active and commit more regularly:
I will go back to smaller incremental releases, which will make it simpler to actually do changes, make sure there's always a version that builds and also makes it easier for everyone to update.
More background info: One of the reasons that prevented me from releasing the last months was an all-or-nothing approach. I wanted to do too much at the same time which prevented me from being able to build and forced me to complete everything to 100%. This is obviously not ideal. I did spend the time and got a lot done, but since I'm not 100% done, I cannot release. Combine this with being highly involved in my main job, this led to no apparent progress.
Ya. Incremental release is better. Btw can you fix the error when selecting game object that has Debug System Behavior? I'm using Unity 2019.3.11. Another question. Do you have any plan to rewrite Entitas Unity debug inspector to UI Element to further improve the performance?

My new structure shows first positive effects. I updated DesperateDevs and Entitas so I can build again and enable incremental changes again. Here's an unsorted list of things I'd like to do next:
- Proper support for Namespaces
- Migrating to sdk-style csproj format
- Upgrade to NetStandard 2.0
- Upgrade code to use latest C# features
- Rewrite Roslyn support
- Start researching Roslyn features like rename refactor for components that will rename methods too
- Update codebase to use default Microsoft Coding Conventions
- NuGet packages
- Support for Unity Package Manager
- Multithreaded Jenny (Code Generator)
- Going through the issues to see what you guys need and suggest
- Docker Support
- Use text files for the code generator
- Create a sample code generator project, so everyone can get into creating and sharing their own plugins
Since I changed my mind to slowly introduce features one by one and try to provide automatic upgrade assistants, I will not call this Entitas 2.0 anymore. I think that's a good thing, because I'd like to enable people to be able to upgrade. My initial idea of Entitas 2.0 contained so many breaking changes that it was hard to upgrade, hence the version bump. I don't think that's a good strategy.
Maybe the new Source Generators can be of use/inspiration.
@BenjaBobs Looking at that, I totally agree. However, I think it's too early to adopt them right now; since Entitas and Jenny are meant to be core infrastructure, in my mind it's critical that any of their dependencies are production-ready and easily available. Stick a pin in that and check up on them in a year.
So how's this going?
Hi, some updates, as I had a short amount of time to continue working it, and I'm currently pushing to get some time during my work for this.
- Proper support for Namespaces
- Support for Unity Package Manager / asmdefs
Those 2 will be my next focus as they will also become important for the way I create games. I'd like to be able to ship game features as packages with namespaces.
Current problems that are preventing this:
-
Incomplete and strange namespaces support Proposed solution: update namespace support Task: rework the code generator templates to support namespaces Benefit: use namespaces as they are inteded to be used. Write more modular code
-
code generator uses partial class which forces us to have one assembly Proposed solution: use C# extensions instead Task: rework the code generator templates and go from partial classes towards C# extensions Benefit: features can be bundled in dlls or packages and are self contained. A solution can have multiple projects that use Entitas. Generated code is already contained in the bundle. This will probably enable modding games with Entitas.
-
generated code contains hardcoded component indices Proposed solution: use reflection during initialization to assign component indices Task: remove the generated ComponentsLookup classes in favour of dynamic component index evaluation Benefit: new features could be added by simply dropping another package / dll into your codebase. Should probably enable to load dlls from a specific destination to enable modding.
There might be followup tasks like VisualDebuging adjustments that I will tackle once I encounter them + most likely some unknown unknowns. Moving from partial classes to C# extensions will require to migrate existing code bases. I plan to provide at least a simple migration assist like in the past to update most of the code. A more robust solution would be to actually use roslyn to analyse and update the code. I will read into this, but I don't have any prior knowledge other than parsing the codebase for Entitas related things. No guarantees yet, but would be really nice!! :)
Thanks for the update Simon
- generated code contains hardcoded component indices
Please consider static initialisers also if possible.
Currently totalComponents is required to be known before any context gets created. It forces order of initialisation – to get all types from plugins and only then create any Context. This could be refactored to allow different initialisation order or left as is.
Hi just wanted to check in where you may be at with this please:
I will explore the idea of including it to the GitHub version, so everyone can enjoy Jenny right from the start.
:)
Hi! great timing :) I will announce sth probably by the end of next week. If all turns out well, it's gonna happen very soon! More info (hopefully) next week!
Awesome. Can't wait to see that
Do we have any updates?
Hi, yes, we're currently figuring out the details, but Entitas development capacities will be increased and there will be a change to the Unity Asset Store version to make it more accessible for more people. According to current plans I will do a more detailed announcement on Feb 15th and I'm really looking forward to share more great news soon
Update:
Entitas development is back on track!
- Entitas 1.14.0 is out (.NET 6.0, .NET Standard 2.1)
- One Entitas version - Desperate Devs is open-source
- Created public Entitas board to follow Entitas development
- informal roadmap from another discussion
Will close this issue and will update you using GitHub Discussions and Entitas Discord
Happy coding :)