Godot Version
4.6.1-stable+
Question
When overriding the virtual method Object._to_string is there way to fall back on the default method?
class_name MyCustomClass
extends Resource
func _to_string() -> String:
if condition:
return "My Custom Class"
else:
return default
For example, if I have a class that extends Resource, if condition is true then print(MyCustomClass.new()) should print "My Custom Class" but if condition is false then it should print the default <():Resource#XYZ>