[gdscript] operator[] for user class

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


I’m wondering is there a way to override operator[] for an user class in gdscript like it can be done in C++? It would be good to have that feature for user-classes.


:bust_in_silhouette: Reply From: sash-rc

Already answered https://forum.godotengine.org/63552/godot-class-operator-overloading

But you can use C++ :slight_smile: