-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Calling a method of your own Reference script within PREDELETE notification fails #31166
Labels
Milestone
Comments
Zylann
changed the title
Calling a method of your own script within PREDELETE notification fails
Calling a method of your own Reference script within PREDELETE notification fails
Aug 6, 2019
I've stumbled upon very similar experience in #6784 (comment). |
Hehe No idea what happens, but it's still valid in d711c57 |
Still valid in 16524d4 |
Still valid in v3.4 |
Still reproducible in 4.0 RC 1. |
Still reproducible in 4.2-dev (0606ba7), and it's crashing:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot 3.1.1
I made a script class which has a
clear()
function, for which the goal is to cleanup some external resources. It can be called by code using the class, or at the destruction of the instance. The only destructor logic that I know of isNOTIFICATION_PREDELETE
.However... that doesn't work :(
When I run this, I get the following error:
Which isn't helping here, and makes no sense because
_notification
was called in the first place. I would like to be be able to call functions of my own script, otherwise I have to entirely copy/paste its contents...Note: that situation only seems to occur with
References
. If I inheritNode
andfree()
it, the code runs normally.I tested with inner classes but the same issue happens with file scripts.
The text was updated successfully, but these errors were encountered: