Godot Version
4.7.2
Question
Hello, I am in the process of making a system where pressing the "Q" key will drop the current selected item in the hotbar I have created. The item script uses the "Access as unique name" feature to reference the GameManager scene in my game, and the GameManager script is where it runs code if the "Q" key is pressed.
This works for the most part, I can pick up an item by colliding with it, where it will be added to my hotbar system. And then if I press the "Q" key while an item is selected, it will drop the correct item.
The issue I am running into is that the items that are instantiated when the GameManager script spawns them in don't get the reference to the GameManager scene, and instead return null, and produce the following error: "item.gd:3 @ implicit_ready(): %GameManager (relative to /root/Potion)."
I have tried to figure it out myself as well as looking online for solutions, and it seems that is has something to do with where the instantiated scene is in the scene tree. Previously, I had tried instantiating it as a child of the GameManager scene to see if that would fix the issue and had no luck.
Screenshots of relevant code are below, and I am more than happy to provide more screenshots should they be needed. Any help on trying to get this to work is greatly appreciated, thanks!
In the Item script, a variable is initialised that stores the GameManager scene by finding it with its unique name.
![]()
Prints the result of game_manager. When the Item scene is placed manually in the level via the editor, it returns the following:

![]()
When the Item scene is instantiated by the GameManager script, it returns the following:
![]()
The reason the item needs a reference to the GameManager is because it needs to call the update_items function inside the game_manager.
In the GameManager Script, it will instantiate the item that the player has selected in the hotbar, and add it to the scene tree.
![]()
