Godot Version
4.4
Question
Why isn’t @export for PackedScene not updating selected scene?
I’ve created
@export_category("Cannon properties")
@export var cannon_scene: PackedScene
and set it to be
but when I try to launch game (f5) game crashes and says “Cannon call method instantiate” on a null value
It’s possible that the variable is null even if you assigned it in the inspector.
One reason could be that you have instanced the scene the PackedScene variable is on as a child of another scene and that instance doesn’t have the correct export variable set.
Another reason could be that you are instancing the script the PackedScene variable is on instead of the scene file, which wouldn’t have the values of the export variables saved. It’s not possible to tell for sure with the information you have given.
No, I’ve found out that any change I made in Inspector tab (I mean everything that comes to there by @export from my script) doesn’t seem to change at all
I’ve set my player’s move speed to 100

but it still moves with 6.0 that written in my code
And yes, know that I should save before launching the game
Oh that might be pretty dumb but seems that I’ve changed some Inspector values in Main scene and forgot to reset them. Now it’s not changing because value from main scene overrides other values
1 Like