Entitas
Entitas copied to clipboard
How Can I add a namespace for my GameEntity and InputEntity?
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
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.
Thank you for your answer @zhuchun , but this just adds namespace to the component, and I want to add namespace to GameEntity。
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?
@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.
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.
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