Inspector Variables Not Working

Godot Version

Godot v4.5.1 Stable

Question

Time for another newbie question. For the past few days I’ve been working on my new game, first timer for GODOT.

I noticed that for some reason, my Speed value in the inspector wouldn’t adjust my speed in-game, no matter what I set the value to. Upon further investigation, I noticed that none of my exported variables did anything through the Inspector and all changes had to be made directly inside the script. I tried deleting my CharacterBody3D (Player) and creating a new one. I tried deleting the script entirely and making a new one. Tried restarting the application a few times.
Tried playing with the numbers in exotic ways. All variables for all Nodes with exported vars are completely unchangeable via the inspector. While not the end of the world, it is a pain when I want to quickly modify a value and run the game again.. does anyone else have this issue, and do you know of a way to fix this without me having to do the “Custom Resource” script solution?

Thanks everyone!

How did you determine that?
Do you have setters on those variables? If yes, post the setter code.

Sorry, no I’m not using setters.

What I meant by “unchangeable” is that no changes I make impact the game. I can change the values inside the inspector, such as changing “Move Speed” to 1, 500 etc but nothing happens in game.
Or in my enemy spawn inspector changing the “Spawn Interval” (in seconds) to 1, 30 etc.
But when I start the game, these changes don’t take effect, regardless of which scene it applies to, which node, or any other apparent factor.

Well let’s see what’s your code is doing with those exported variables. For example how is move_speed utilized by your code?

Sure thing, here’s the code utilizing move_speed, with some extra code to see how the rest interacts with movement:

Are you changing the values on the scene itself or scene instance in the main scene? Instantiated scene exports will override anything you set inside the scene.

At this time I’m changing the values of an instance in the main scene.

Can you post a minimal reproduction project?

1 Like

Very good news!

Upon your request, I began working on an MRE to share. When I duplicated the file and started stripping away at the copy to reduce it to its most basic form, I noticed there was an unfamiliar tscn file labeled node_3d.tscn. Upon deletion of it, all my inspector variables began to work again (this also fixed some other issues I was having).
I have no idea where this file came from, why it was there or what gave it so much power but it seems to all be fixed now. I applied these changes on my main project file and everything seems to function perfectly again.