Archive 17/01/2023.

Why some components can be disabled and some cannot?

Eugene

What does it depend on?

cadaver

Ultimately it depends on whether the OnSetEnabled() virtual function has been implemented. I know some subsystem-like components are missing this. For example PhysicsWorld has a slightly different situation, as it has a function called SetUpdateEnabled() which allows to set automatic per-frame physics simulating on/off. However the PhysicsWorld is never wholly “disabled” as such, but it could also be manually stepped even if SetUpdateEnabled() is false.

Eugene

Understood.
How is it handled by Editor?
Some components have X button and some don’t have it.
Components that don’t have X button can’t be enabled/disabled even through menu command.

cadaver

It checks for “Is Enabled” being the first attribute.