sschmid / Entitas

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

Better namespace handling #927

Closed ianeinman closed 1 year ago

ianeinman commented 4 years ago

Unity doesn't support namespaces all that well. They tend to dump all user-created scripts into the unnamed namespace, which is a mess. Entitas seems to inherit this problem and I'd like to see it improved.

The first thing I do when adding any script is put it into a namespace. But when I put Entitas components into a namespace, it causes compile issues. There is an option "ignore namespaces" but that doesn't really do what I want.

What I'd like to see is that for any given context (e.g. Game) I have a way to put all classes related to it into a namespace of my choosing. Both my source classes with the components defined, and the generated code, need to be in the namespace(s) that I define.

dafong commented 4 years ago

I upvote for this

sschmid commented 2 years ago

Yes! Proper namespace support is coming to Entitas 2.x

sschmid commented 1 year ago

Hi! I will close this in favour if #1005 which is about the new code generator that properly supports namespace and multiple projects, like when using Unity asmdef.