Y
Hacker News
new
|
ask
|
show
|
jobs
by
Narishma
1000 days ago
Presumably because GDScript doesn't support structs.
3 comments
TazeTSchnitzel
1000 days ago
It does support classes with strongly typed fields, though, which are the next best thing. It's just a poorly designed API, it's not a reflection of language limitations.
link
harpiaharpyja
1000 days ago
Exactly. Why can't it return a RaycastResult or whatever.
link
nextaccountic
1000 days ago
In this sense it's like Lua right? And people don't complain (much) about using Lua in gamedev
link
krapp
1000 days ago
If you want "structs" in GDScript, use Resources.
I know it's not the same thing at all but it's as close as you're going to get.
link