Add Active component for all kinds of disabling purposes #1330
Labels
A-Engine
C-Code-Quality
A section of code that is hard to understand or change
D-Good-First-Issue
Easy but interesting
P-Urgent
This issue is a big priority, and it would be good to close it ASAP
Milestone
Problem
We currently have the
active
field in the camera component. In the future, it would also be nice to have a similar field for light types, for example. This would lead to duplicating this field all over the place though.It wouldn't also be possible to treat the 'disableable' entities in a generic way.
Solution
Instead of duplicating this field all over the place, we could move it to its own component,
Active
.We could add it to a new
activePlugin
in the engine which does nothing but add it.The camera plugin should be changed to use this plugin.
It would also be nice to use this opportunity to add toggleable lights, by skipping shading for lights whose
Active
component is set to false.It would also be important to add observers which automatically add
Active
components where needed, if missing, by default set to true.The text was updated successfully, but these errors were encountered: