Is your feature request related to a problem? Please describe.
Stride does not provide a way to toggle entities, but it does provide a way of toggling all activable components using Entity.EnableAll.
However, there is a bit of inconsistency between Game Studio and the runtime:
- Game Studio treats all components with an
Enabled property (even if manually defined) as activable (the property is placed next to the component name.
- Stride's
EnableAll only works with components deriving from ActivableComponent.
Describe the solution you'd like
Introduce an IActivableComponent interface with a required Enabled property and make Game Studio and EnableAll only treat components with that interface as activable.
Describe alternatives you've considered
- Make Game Studio only treat
ActivableComponent components as activable - the problem is that ActivableComponent can't have Update or Execute, which is limiting.
- Make
EnableAll look for Enabled property - seems like it would be too computationally expensive.
- Remove
EnableAll and instruct users to just remove entities from scenes and store them in a variable - as much as I like this idea, the feature is already there
Is your feature request related to a problem? Please describe.
Stride does not provide a way to toggle entities, but it does provide a way of toggling all activable components using
Entity.EnableAll.However, there is a bit of inconsistency between Game Studio and the runtime:
Enabledproperty (even if manually defined) as activable (the property is placed next to the component name.EnableAllonly works with components deriving fromActivableComponent.Describe the solution you'd like
Introduce an
IActivableComponentinterface with a requiredEnabledproperty and make Game Studio andEnableAllonly treat components with that interface as activable.Describe alternatives you've considered
ActivableComponentcomponents as activable - the problem is thatActivableComponentcan't haveUpdateorExecute, which is limiting.EnableAlllook forEnabledproperty - seems like it would be too computationally expensive.EnableAlland instruct users to just remove entities from scenes and store them in a variable - as much as I like this idea, the feature is already there