extends Node2D
func _physics_process(_delta:float) -> void:
pass
func _ready():
if $Player/Camera2D.is_current():
$"Main menu/Camera2D".make_current()
else :
$Player/Camera2D.make_current()
var do_it: bool = true
func _ready() -> void:
if do_it:
do_it = false
function_call()
For each instance, _ready is only called once anyway, so adding a per-instance variable to check for it shouldn’t make a difference. If you want it to be run once across all instances, do what @that_duck posted but with do_it as a static variable.
Thanks