Godot Version
4.2
Question
Hi,
I’m new to Godot and I’m trying to build a simple game. I have a script that describes the overall behaviour of a building, which preloads a more specific script.
The relevant fragments are:
var production_script
const PS: Script = preload("res://Scripts/BuildingProduction.gd")
func _ready():
production_script = PS.new()
Now this is all and dandy, but my issue lies here:
The _process
function is never called in the preloaded script, I have to resort to manual call of the function:
func _process(delta):
production_script._process(delta)
Am I missing something, is there some more elegant way to do this?