Add the ability to use custom classes in @export and Array[Type] #4918
Locked
hidemat
started this conversation in
Engine Core
Replies: 1 comment 1 reply
-
This has been a long since discussed topic since 2019. Proposal: #18 |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
I'm pretty sure there is a reason why this is not allowed yet, but nonetheless, just want to put it out there. This would be nice.
For example, if I make a
CustomResource
that extendsResource
the only options that I can think of are:@export var custom : Resource
and then do a cast somewhere in my codecustom = custom as CustomResource
CustomResource
as a built-in type by making a c++ module or GDExtension. The problem with this is that not everybody is comfortable with dealing with c++ modules or GDExtensions, and it feels like overkill in terms of implementing a simple custom resource.And it's the same situation with the
Array
type. If, for example, I iterate through and Array I need to cast it like so:I guess I'm ok with these workarounds, but it would be a huge plus for people that are used to static typing. It's a quality-of-life improvement. What do you guys think?
Beta Was this translation helpful? Give feedback.
All reactions