Entitas icon indicating copy to clipboard operation
Entitas copied to clipboard

How Can I add a namespace for my GameEntity and InputEntity?

Open foreverpains opened this issue 6 years ago • 6 comments

Hi,

I have two projects that I want to put together. How Can I add a namespace for my GameEntity and InputEntity? like this

using Entitas;
namespace XXX
{
     public sealed partial class GameEntity : Entitas.Entity {
     }
}

Cheers

foreverpains avatar Jul 29 '18 14:07 foreverpains

Open the property file in your root folder, find a line with "IgnoreNamespace" and set it to false. Next time the code generator will give you something like "MyNamespaceMyComponent", it's long though.

zhuchun avatar Jul 29 '18 14:07 zhuchun

Thank you for your answer @zhuchun , but this just adds namespace to the component, and I want to add namespace to GameEntity。

foreverpains avatar Jul 30 '18 03:07 foreverpains

As far as I know, that's not supported.

That's interesting, why would you do that? Maybe other solution can solve your problem, other than use namespace?

zhuchun avatar Jul 30 '18 03:07 zhuchun

@foreverpains are you going to copy the the generated codes to other project? If yes, stop.

Just copy the component classes you created to the other project, and then hit the generate button. The necessary classes will be generated, which including the class your post.

The namespace for generated codes is meaningless.

roygear avatar Jul 30 '18 05:07 roygear

I upvoted this issue.

I've saw there's plenty of use for this.

If you want to have many parts of games in a single project. Why don't we separate it to other Contexts by generating along with namespace?

Think about a project with mini-games. There shouldn't be coupled in a single Contexts. And also case like separate core-loop and game completely.

benzsuankularb avatar Oct 24 '18 19:10 benzsuankularb

I'm not sure if it the same with this issue. But I think it's different cases. https://github.com/sschmid/Entitas-CSharp/issues/323

@sschmid If you interested for Entitas1.8.3

benzsuankularb avatar Oct 24 '18 19:10 benzsuankularb