I have a structure set like this:
- Map (main scene)
-- Player (sub scene, instanced)
On my Map.gd, I've set an onready variable like this:
onready var tilemap = get_node("TileMap")
which works fine, obviously.
However, if in my player.gd I set this:
onready var tilemap = get_parent().tilemap
It doesn't work, and return
onready var tilemap = get_parent().get_node("TileMap")
Is this a bug, or just something I'm not understanding well?