I would like to be able to print a class like an array, what I mean by this is that when you print an array you get this.
var array: Array = [1,2,3,4,5]
print(array)
# Output
[1,2,3,4,5]
I want to be able to do this with a class but I wanted to know if there was a way to do this without going through each value using get_property_list()
. Like this.
class Test:
var valueA = 1
var valueB = 1
print(Test)
# Output
{"valueA": 1, "valueB": 1}
Kinda like if you printed a dictionary.