You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Classes can't be added to the global namespace if they are not in the same directory. Instead this can be worked around and emulated by doing
const MyClass := preload("path_to_my_class.gd")
So when processing scripts at compile/save time, gather all global classes, and add them to the start of every processed script (after @tool and class_name)
The text was updated successfully, but these errors were encountered:
dugramen
changed the title
Prepend const MyClass := preload(processed_path + "/wrappers.gd").MyClass to every gdscript class to simulate global scope access to these classes
Add all class_names as manual preloads to all processed gdscripts
Nov 25, 2024
Classes can't be added to the global namespace if they are not in the same directory. Instead this can be worked around and emulated by doing
So when processing scripts at compile/save time, gather all global classes, and add them to the start of every processed script (after
@tool
andclass_name
)The text was updated successfully, but these errors were encountered: