Topic was automatically imported from the old Question2Answer platform.
Asked By
Elis
Hi!
How can I name my classes so that I can get them as string with a function?
I see two problems: either I don’t know how to properly name my classes, or I don’t use the right function/method to get the class as string.
This is what I do for now, which outputs “Reference”.
class alpha:
var v1
func _init(v1):
self.v1 = v1
var a = alpha.new(1)
print(a.get_class()) ---> Reference