Skip to content

rapushka/Entitas.Generic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

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:

How to install

  • Just Clone this repo into your project's folder
  • Maybe you'll need some additional setup for your engine:

Unity

  • It should automatically add the ENTITAS_GENERIC_UNITY_SUPPORT define to your project in Project 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 the Editor/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

Godot

  • In the .csproj file add references to the following .dlls:
    • 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:

Examples

There is not wiki yet:( but you can check my other projects, where i used this library by myself!

How to

TODO: wiki

What works?

Unity

Almost all of the original sschmid/Entitas functionality has been implemented (at least what makes sense imho), including:

  • EntityIndex and PrimaryEntityIndex
  • EventAttribute
  • CleanupAttribute
  • UniqueAttribute

Godot

Runtime works, but not the Visual Debugger and other editor things

Addons

I also added some additional features that i wish were in the original Entitas, including:

  • EntitytBehaviour and ComponentBehaviour (a.k.a. Blueprints) – Allow you to add your components as MonoBehaviours
  • ComponentID – dropdown to pick component in Unity

About

fork of lightjiao/Entitas.Generic with my preferences

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C# 100.0%