No way to get Gd<Self> without casting #302
Labels
c: register
Register classes, functions and other symbols to GDScript
quality-of-life
No new functionality, but improves ergonomics/internals
AFAIK the only way to get
Gd<Self>
is to use base asbase.share().cast()
.But not taking to account cast overhead this is not safe and can lead to runtime bugs that ideally should be caught during compilation:
It would be nice if
#[derive(GodotClass)]
automatically generated Self-typedshare
method for such cases:The text was updated successfully, but these errors were encountered: