Closed a-soulspark closed 3 weeks ago
Doing a little more digging, it seems like the post_install
method of DialogicSubsystem is designed specifically for this purpose. I also checked the collect_text_modifiers
function and it seems to have similar logic to collect_text_effects
, so it is also affected by this issue!
Moving the collection of text effects/modifiers to the post_install
function, in my project, it seems to behave as intended.
Cool catch. Thanks for letting us know. We should certainly move it into the post_install method!
The problem
Attempting to add custom text effects through custom Extensions causes an error.
Describe the bug Likely due to the ordering in which different modules/extensions are loaded, the Text subsystem (which is responsible for Text Effects) gets ready before extension's subsystems gets created, which causes it to fail to create a Callable for the custom effect's method.
The error looks something like:
with the troublesome line causing the error being (in the Dialogic version I am using)
which apparently tries to get the extension's subsystem node before it was created.
To Reproduce Steps to reproduce the behavior:
index.gd
file, add a definition for a text effect. Something like:[...]
func _get_text_effects() -> Array[Dictionary]: return [ {'command':'foobar', 'subsystem':'ExtensionName', 'method':'effect_foobar'}, ]