I want a function that can return something, or not, in gdscript
func test() -> String | null:
return null if random() > 0.5 else "hi"
The syntax above is not real. How do I make a return type of String or null?
I want a function that can return something, or not, in gdscript
func test() -> String | null:
return null if random() > 0.5 else "hi"
The syntax above is not real. How do I make a return type of String or null?