Merge pull request #91472 from vnen/gdscript-default-static-variables-non-tool

GDScript: Initialize static variables with defaults in-editor
This commit is contained in:
Rémi Verschelde
2024-05-03 01:21:40 +02:00
2 changed files with 27 additions and 0 deletions

View File

@ -169,6 +169,9 @@ private:
GDScriptFunction *static_initializer = nullptr;
Error _static_init();
#ifdef TOOLS_ENABLED
void _static_default_init(); // Initialize static variables with default values based on their types.
#endif
int subclass_count = 0;
RBSet<Object *> instances;