Replies: 1 comment 4 replies
-
You can already instantiate scripts dynamically. And even the var script = load('res://my_script.gd')
var script_1 = load('res://my_script_1.gd')
var instance = script.new()
print(instance is script)
print(instance is script_1)
print(instance is Node)
print(instance is Reference) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For example:
I want to know the actual type of property at runtime, but currently we can only know that they are
TYPE_OBJECT
viaget_property_list
.So I hope GDScript exposes a method that can get a script instance of property type:
If implemented, we can do cool things like dependency-injection for properties.
Beta Was this translation helpful? Give feedback.
All reactions