mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Allow ClassDB to create a Object without postinitialization for GDExtension.
This commit is contained in:
@@ -207,10 +207,13 @@ void Object::cancel_free() {
|
||||
_predelete_ok = false;
|
||||
}
|
||||
|
||||
void Object::_postinitialize() {
|
||||
_class_name_ptr = _get_class_namev(); // Set the direct pointer, which is much faster to obtain, but can only happen after postinitialize.
|
||||
void Object::_initialize() {
|
||||
_class_name_ptr = _get_class_namev(); // Set the direct pointer, which is much faster to obtain, but can only happen after _initialize.
|
||||
_initialize_classv();
|
||||
_class_name_ptr = nullptr; // May have been called from a constructor.
|
||||
}
|
||||
|
||||
void Object::_postinitialize() {
|
||||
notification(NOTIFICATION_POSTINITIALIZE);
|
||||
}
|
||||
|
||||
@@ -2129,6 +2132,7 @@ bool predelete_handler(Object *p_object) {
|
||||
}
|
||||
|
||||
void postinitialize_handler(Object *p_object) {
|
||||
p_object->_initialize();
|
||||
p_object->_postinitialize();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user