This is the fork of the lightjiao/Entitas.Generic which is "Originally inspired by yosadchyi/Entitas.Generic"
and which gives you opportunity to use the sschmid/Entitas without Source-Code Generation! With power of c# Generics😼
Plus:
- My subjective preferences — like codestyle, naming, etc.
- Functionality from original sschmid/Entitas, which wasn't present in the lightjiao/Entitas.Generic — see What works
- Some additional stuff — like
ComponentID
s, orEntityBehaviour
s; see Addons - Reflection Backing
- Just Clone this repo into your project's folder
- Maybe you'll need some additional setup for your engine:
- It should automatically add the
ENTITAS_GENERIC_UNITY_SUPPORT
define to your project inProject Settings/Player/Other Settings/Script Compilation/Scripting Define Symbols
.
But if there compile errors - the define won't be added, and you can add it manually.
Or remove theEditor/AutoDefineUnity.cs
if you don't want this define
❗ I've applied the fix for Entitas.VisualDebug in Unity 2022.2+ So if you wanna use this library with older unity – you need to revert this commit i guess
- In the
.csproj
file add references to the following.dll
s:- In Rider you can do it by right clicking on your project > Add > Add reference...
- othervise open the
.csproj
in a text editor add next lines for each library in<ItemGroup>
<Reference Include="DLL_NAME"> <HintPath>path/to/DLL_NAME.dll</HintPath> </Reference>
Entitas/DesperateDevs/DesperateDevs.Caching.dll
Entitas/DesperateDevs/DesperateDevs.Extensions.dll
Entitas/DesperateDevs/DesperateDevs.Reflection.dll
Entitas/DesperateDevs/DesperateDevs.Serialization.dll
Entitas/DesperateDevs/DesperateDevs.Threading.dll
Entitas/Entitas/Entitas.dll
- How this should look like
- More info about Godot-Entitas integration:
There is not wiki yet:( but you can check my other projects, where i used this library by myself!
- Deck Scaler (Unity) - currently working
- the Bad Luck (Godot) – deprecated
- the Bad Luck (Unity) – deprecated
- Burned Jack (Unity) – a submission for Acerola Jam 0 (so the code is shittier than usual)
TODO: wiki
Almost all of the original sschmid/Entitas functionality has been implemented (at least what makes sense imho), including:
EntityIndex
andPrimaryEntityIndex
EventAttribute
- except some of its parameters (
EventType
, priority)
- except some of its parameters (
CleanupAttribute
UniqueAttribute
Runtime works, but not the Visual Debugger and other editor things
I also added some additional features that i wish were in the original Entitas, including:
EntitytBehaviour
andComponentBehaviour
(a.k.a. Blueprints) – Allow you to add your components as MonoBehavioursComponentID
– dropdown to pick component in Unity