Exported type dictionary reseting

Godot Version

4.6

Question

I was trying to make a typed dictionary with keys being a part of an enum called type in an autoload named StatManager and values being a class Stat that extends resource.

I tried putting in the editor a key health.

But when i run the game it goes to max health

I declared the dictionary like this

@export var stats: Dictionary[StatManager.type, Stat] = {}

Also even with typed dictionary the editor wont show me StatManager when i start typying i thought it would. I even tried making another dictionary named test made it the same way but when i started typing it wouldnt show the StatManager name at first

Can you paste more of your code?

Sure

The StatManager script

And the Stat class body

Pasting code instead of screenshots would help

Where’s the stats export declared and where/how do you set its value(s)?

My bad i forgot to click on the add key/value pair button because i assumed export dictionaries were exactly like export variables