Hello,
I'm writing a plugin script script in which I want to execute certain instructions when a custom object is deleted. The custom class inherits from MeshInstance.
The following is the relevant code in _notification():
func _notification( what ):
if ( Engine.editor_hint ):
match ( what ):
#...
NOTIFICATION_PREDELETE:
print( "%s PREDELETE" % [name] );`
When I select and delete one of the custom objects in the editor, the text is not printed.
Does this simply not work in the editor? Does this notification have to be activated somehow (like set_notify_local_transform() for Spatials)?
Thank you.
P.S.: NOTIFICATION_UNPARENTED does work when the object is deleted, but it's also called at other times, which is why I can't use it.