Skip to content

Add Active component for all kinds of disabling purposes #1330

@RiscadoA

Description

@RiscadoA

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.

Metadata

Metadata

Assignees

Labels

A-EngineC-Code-QualityA section of code that is hard to understand or changeD-Good-First-IssueEasy but interestingP-UrgentThis issue is a big priority, and it would be good to close it ASAP

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions