I've made a class script that looks like this:
extends Node
class_name Class
func method():
pass
Then I've added a child node using that script in my main scene.
Next, in my main scene gdscript, I've added this bunch of code:
extends Node2D
var class = $Class # That's the child node using my previous script
func _ready():
print(class.method())
And no matter what I put in the method() function, the main script will always print "Null" in my output. I've tried putting stuff to print and it behaves exactly like it should except that it still prints "Null" at the end of my output.
Does anyone know how to fix this?