SystemEntity and EntityManager #768
MathiasPaulin
started this conversation in
Design discussion
Replies: 1 comment 1 reply
-
|
I am fine with removing the singletons and make them as private attribute of |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As mentioned in the PR #763 and the issue #767, The singleton
SystemEntityis managed by theEntityManagerand the lifetime of this singleton is the one of theEntityManager.The
EntityManager, that is not a singleton, has the lifetime of theEngineand is fully managed by theEngineThis lifetime restriction make the notion of singleton quite unappropriated for
SystemEntity.Note that this discussion should also be related to other singleton whose lifetime is the one of the
Engine:ComponentMessengerDebugRenderSystemEntityAs all of these singletons are specific to the
Engineinstance (that is a singleton), we can change their status to private attribute of the engine, with methods in theEngineallowing to access these attributes. We already did this forSignalManager,RenderObjectManager,ShaderManagerandTextureManager.ComponentMessenger, DebugRender and SystemEntity, whose lifetime is the one of the Engine should be integrated into the Engine as the other managers.
If we do this, there will remain only 2 singletons in the Radium libs :
So the question is :
I think they don't and propose to integrate the 3 singletons above as private attributes into the Engine.
What about this proposal ?
Beta Was this translation helpful? Give feedback.
All reactions