Activable equivalent of SyncScript
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.
There is not an interface used for ActivableEntityComponent, making the Enabled property not something that can be arbitrarily implemented on scripts such as SyncScripts. This would be used to be able to turn off groups of scripts without knowing explicit types, allowing loose coupling.
Describe the solution you'd like
Equivalent of SyncScript with an Enabled property similar to ActivableEntityComponent. Ideally preventing having to implement an Enabled property on each component that may need this feature, and allowing for a polymorphic usage of multiple activable sync scripts.
Describe alternatives you've considered
Manually creating an Enabled property with a guard clause on types that would need this type of functionality.
Additional context
Not Applicable
Here are some questions that can aid in the description of the feature request:
-
What are the usecases?
Disabling of an update loop, for example on a third person camera that tracks the player so it could be controlled by something else, such as a cutscene manager. -
What kind of options/settings are expected/wanted?
Simple bool property called Enabled similar to ActivableEntityComponent that disables Update calls without having to add a guard clause at the beginning of each update call. -
What would the (pseudo) code look like?
Not applicable. -
Is the feature affecting behaviour in the editor?
Yes.- if so: how should this look in the editor?
Checkbox identical to ActivableEntityComponent.
- if so: how should this look in the editor?
-
Is there a component or datastructure?
New abstract class of the same name as the title -
what kind of documentation is needed or needs to be updated?
New documentation for ActivableSyncScript, or changes to SyncScript detailing the alternate type. -
Should there be an example project?
Not required.
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
Compare SyncScript with ActivableEntityComponent to determine the intended abstraction and how Enabled affects update calls. Then inspect the editor handling for ActivableEntityComponent; done means activable sync scripts can be used polymorphically, skip updates when disabled, and expose the requested checkbox.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100