Better way of adding an `Enabled` property on a component.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
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
Enabledproperty (even if manually defined) as activable (the property is placed next to the component name. - Stride's
EnableAllonly works with components deriving fromActivableComponent.
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
ActivableComponentcomponents as activable - the problem is thatActivableComponentcan't haveUpdateorExecute, which is limiting. - Make
EnableAlllook forEnabledproperty - seems like it would be too computationally expensive. - Remove
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing ActivableComponent and Entity.EnableAll behavior, then compare how Game Studio identifies components with an Enabled property. Verify the proposed interface can cover runtime and Game Studio use cases, and confirm that both systems consistently recognize only components implementing it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100