godotengine / godotengine/godot-cpp

[GDExtension] Allow having generic classes as array-like in gdscript

Open
#606 1 comment 0 reactions 0 assignees View on GitHub
enhancement topic:gdextension
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

In GDScript, when you make custom classes with gdext generally this is the way:

`var myExtClass:CustomClass = CustomClass.new()`

but what if I want to have an array-like class with generics? its currently possible? Something like:

`var test:CustomClass[float] = []`

this means that in cpp the customclass is:

```cpp
class CustomClass : public RefCounted {...};
```

where T is really T or it could be Variant or Object to support other custom classes

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.