Entitas icon indicating copy to clipboard operation
Entitas copied to clipboard

Better namespace handling

Open ianeinman opened this issue 4 years ago • 2 comments

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.

ianeinman avatar Nov 23 '19 10:11 ianeinman

I upvote for this

dafong avatar Dec 09 '19 09:12 dafong

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

sschmid avatar Sep 07 '22 12:09 sschmid

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.

sschmid avatar Jul 03 '23 13:07 sschmid