Does godot have the ability to make arrays of custom classes like in unity

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dragon20C

in unity we can do this to make an array of a custom class.

 public List<CustomClass> Container = new List<CustomClass>();

but in godot I cant seem to do something equivalent to that I can make an array but not make it use my custom class with it

Not now,
but it’s in new version Godot 4 (GDScript 2) which is under the development.

IceExplosive | 2021-07-10 18:17

That’s good news and bad news, good it’s coming, bad that we don’t know when 4.0 releases lol

Dragon20C | 2021-07-10 20:14

4.0 should be here any time now! (Mid 2021 is what Juan said in a Twitter post!)

Snail0259 | 2021-07-10 22:01

Mid 2021 was desire, but we are already past that and not even alpha is out.
But we might expect that alpha come out soon based on this:

Update the estimated release date for Godot 4.0 by Calinou · Pull Request #5058 · godotengine/godot-docs · GitHub

IceExplosive | 2021-07-11 07:28

Oh ok. Oh well, it’s still pretty exciting!

Snail0259 | 2021-07-11 11:31

:bust_in_silhouette: Reply From: klaas

godot arrays are allways of type variant, there are no typed arrays.
But that does not hinder you from using it with your custom objects.

:bust_in_silhouette: Reply From: timothybrentwood

Groups probably provide similar functionality to what you’re wanting:

Unfortunately no groups would definitely not be ideal for what I’m trying to make, thanks for the reply though.

Dragon20C | 2021-07-10 20:15