Godot Version
4.3
Hello,
I have a lack of understand of what is going on in my script.
I created resources to save power ups and some other stats.
I load them in the following way:
extends Node2D
@export var stats: GlobalStats
@export var upgrade_stats: UpgradeShop
func _ready():
stats = load("res://Ressources/global_stats.tres")
upgrade_stats = load("res://Ressources/upgrade_shop.tres")
The “stats” and “upgrade_stats” variables do take over the values of their corresponding resource but I can see in the inspector that there is basically a copy of the resource variables and all with the value zero.
Why is that? Shouldn´t they be the original values?
How can I change those values?
`
Best regards!
Jayme