sschmid / Entitas

Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
MIT License
7.08k stars 1.11k forks source link

how do I create 2 separate "Context" ? #951

Closed bayganik closed 2 years ago

bayganik commented 3 years ago

Hi,

Thank you for sharing your software. How do I create 2 separate "Context" to be able to create entities? for example: I want my Game entities to be created separate from UI entities.

I tried different system and features but it won't work.

Cheers Kamran

WeslomPo commented 3 years ago

Make separate contexts like GameContext and UiContext, no? You can make a different contexts in preferences.

bayganik commented 3 years ago

I use Entitas in csharp. I do NOT use Unity.

c0ffeeartc commented 3 years ago

You should modify config file that generator reads from and add context name to Entitas.CodeGeneration.Plugins.Contexts see https://github.com/sschmid/Match-One/blob/master/Jenny.properties for example

sschmid commented 2 years ago

@bayganik See Entitas-Standalone It's a pure C# console app. Contexts can be defined in Jenny.properties by specifying a comma separated list of context names for Entitas.CodeGeneration.Plugins.Contexts