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
Issue description:
If I trying to extend ProjectSettings I have parsing error:
modules/gdscript/gdscript_compiler.cpp:1864 - Condition "native.is_null()" is true. Returned: ERR_BUG
Extending ProjectSettings can be very useful to add helper methods such as add_gravity() instead of using get_setting("physics/3d/default_gravity") every time.
Steps to reproduce:
Create a script.
Extend it from ProjectSettings.
Add any method or variable.
Try to use it in code.
Minimal reproduction project: PrjectSettings.zip
In this project I created MySettingsNode class that inherits from Node and works as expected. Also I created MySettingsProjectSettings class that have the same code, but will not work (just try to instantiate it from code to see the error.
Temporary workaround:
For now it is possible to create a class and with static functions and just access to all settings via ProjectsSettings because this is a singleton. This is useful to the error looks like a bug.
The text was updated successfully, but these errors were encountered:
Godot version:
3.2.1
OS/device including version:
Arch Linux
Issue description:
If I trying to extend
ProjectSettings
I have parsing error:Extending
ProjectSettings
can be very useful to add helper methods such asadd_gravity()
instead of usingget_setting("physics/3d/default_gravity")
every time.Steps to reproduce:
ProjectSettings
.Minimal reproduction project:
PrjectSettings.zip
In this project I created
MySettingsNode
class that inherits from Node and works as expected. Also I createdMySettingsProjectSettings
class that have the same code, but will not work (just try to instantiate it from code to see the error.Temporary workaround:
For now it is possible to create a class and with static functions and just access to all settings via
ProjectsSettings
because this is a singleton. This is useful to the error looks like a bug.The text was updated successfully, but these errors were encountered: