-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Include extensions in the call ordering of notifications #5585
Comments
Personally I think that's a bug, already reported it: godotengine/godot#52325. |
I didn't know about that issue. But reading it it seems that I forgot to take into account the chain of inheritance in extensions and scripts too. I guess I should update the proposal and add that the reversed parameter should also be passed to extensions and scripts. |
Also note that currently in your suggested changes you have the conditions swapped:
In this regard At least that's how |
True. I naively copied the ifs in |
Describe the project you are working on
Godot Kotlin, Godot Fmod
Describe the problem or limitation you are having in your project
Extensions are supposed to behave the same way native classes do in Godot core or a module. But currently, extensions are the last to receive notifications in all cases.
When
reversed
is true, it won't result in the correct behavior. In a chain of class A(native) ==> B(native) => C(extension).The call order will be B, A, C instead of C, B, A.
Update:
The call order should also take into account the inheritance chain in extensions and scripts so they should also accept
reversed
as a parameter.Describe the feature / enhancement and how it helps to overcome the problem or limitation
Simply add a condition that checks the value of reversed and notify the extension before everything else when it applies.
That change could also apply to scripts but I am not sure about potential side effects.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Extensions only:
With Scripts:
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, it's an Object behavior.
Is there a reason why this should be core and not an add-on in the asset library?
No, it's an Object behavior.
The text was updated successfully, but these errors were encountered: