sschmid / Entitas

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

Using without Unity #986

Closed eranimo closed 1 year ago

eranimo commented 2 years ago

The readme says it can be used without Unity (I'm using Godot) but all the documentation for the code generator part assumes you are using Unity. Is there any way to get the code generator working without Unity?

ilywkaa commented 2 years ago

Check here https://github.com/sschmid/Entitas-CSharp/wiki/Entitas-pure-C%23

Jennal commented 2 years ago

@ilywkaa I want to use Entitas on server side, which are writen in .net6. How do I recompile Entitas dlls into .net6?

Jennal commented 2 years ago

@ilywkaa I want to use Entitas on server side, which are writen in .net6. How do I recompile Entitas dlls into .net6?

I just make it a try. net6 project can reference all the 3 dlls without error. But Jenny.exe can't find any component in the project. My component looks like this:

using Entitas;
using Entitas.CodeGeneration.Attributes;

[Game]
[Event(EventTarget.Self)]
public sealed class PlayerComponent : IComponent
{
    public string Name;
}
sschmid commented 1 year ago

@Jennal fyi, Entitas 1.14 will be netstandard2.1 and net6.0 https://github.com/sschmid/Entitas-CSharp/issues/992#issuecomment-1227761712

Jenny will also run on net6.0 and will be able to parse both the old unity csproj + the "new" sdk-style csproj