Godot Version
4.7
Question
Does anyone know how to check what the root node of a scene is via code? For context, I need my enemy ship to check which scene it’s in, and the one im using is definitely wrong, since it crashed instantly.
Thanks! I’m pretty new to Godot, so that’s why i may ask dumb questions. ![]()
extends Area2D
@export var platforner_hard_enemy_texture: Sprite2D
@onready var owner_name = owner.name
func _ready() -> void:
print(owner_name)
func _process(delta: float) -> void:
pass