-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
dict2inst does not work on classes with _init parameters #30572
Comments
Just found an alternative fix: class A:
var value
func _init(val=0):
self.value = val I'm guessing the reason for the crash is that dict2inst uses |
There is a kind of similar problem with bytes2var where a node would not work properly if it has an If i remove the custom |
seems to not be fixed in v3.4.2 as I just ran into this issue was able to go around it by making the parameter have default values but the error that is given is misleading. |
Confirmed, still happens in Changes done in #32534 were never backported to |
This comment was marked as off-topic.
This comment was marked as off-topic.
That is sort of expected, |
Godot version:
Godot Engine v3.1.1.stable.official
Issue description:
dict2inst
does not work on classes with_init
parameters. A simple fix is to manually initialize the object after it has been created with.new()
Steps to reproduce:
Create a scene with an external(not built in script). Then run the scene with this in the script:
The text was updated successfully, but these errors were encountered: