stride3d / stride3d/stride

Better way of adding an `Enabled` property on a component.

Open
#3,191 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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 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

  1. Make Game Studio only treat ActivableComponent components as activable - the problem is that ActivableComponent can't have Update or Execute, which is limiting.
  2. Make EnableAll look for Enabled property - seems like it would be too computationally expensive.
  3. 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.