New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Users to Specify Update / Init Order of Components #304
Comments
Unity has the script execution order: https://docs.unity3d.com/Manual/class-ScriptExecution.html. Maybe a idea? |
I think deriving init and update order via Component attributes (a specific one and a fallback based on component requirements) is a better solution for Duality, as it ties in nicely with existing patterns and structures and also keeps this behavior fixed to the actual types, rather than project settings. |
To clarify: I'm currently thinking of the |
A attribute for update order sounds simple to understand and would solve most problems. It would be nice if this was just a default value which you can change if needed. I think the requiredcomponent derived update is harder to understand and too complex while it only solves some cases. |
Note: Most of the grunt work for this will be making sure iteration order in groups of Components are deterministic at all - visit issue #303 for more info. This issue on the other hand will now specialize on how developers will be able to define and interact with the order that is used internally. Issue #303: Make sure, there is a deterministic order at all. |
Basics
AlgorithmThe algorithm can be described in five steps:
1. Gather constraints
2. Create a constraint graph
3. Resolve loops
4. Propagate sort indices
5. Extract scores
|
Progress
Immediate ToDo
Closing this. |
Summary
Currently, Components are updated by Type, but the actual order of the Types is non-deterministic. Instead, derive the update order from Component requirement attributes and consider allowing a user attribute for changing update order of certain Components globally or relative to each other.
Analysis
The text was updated successfully, but these errors were encountered: