Quick answer: Godot resources behaving like singletons across scenes? They’re cached by path — call duplicate() or use Local to Scene to get an independent copy.
Two enemies share an inventory resource and modifying one updates both. The resource was loaded twice but both calls returned the same cached instance.
Same Path, Same Instance
Godot caches resources by file path. load("res://inv.tres") returns the same object each call. Modifying one enemy’s inventory mutates the shared resource — visible everywhere.
Duplicate at Use Site
var inv = preload("res://inv.tres").duplicate(true)The true deep-duplicates nested resources — without it, sub-resources stay shared.
Local to Scene
On the resource: resource_local_to_scene = true. Each scene that uses it gets its own copy automatically — ideal for per-instance configuration.
Saving and Reloading
If you mutate a duplicated resource and want to persist, save to a per-instance path. Saving to the shared path bakes the change into every other user.
Verifying
Each enemy mutates their own inventory; the others are untouched.
“Resources are cached by path. Duplicate or Local to Scene to get independent copies.”
For data templates, store the template as .tres and always duplicate at instantiation — treat the source like a class, the duplicate like an instance.