For the purpose of a cache, I am saving and loading a resource (.tres) file from the user:// folder. The saving works alright, but I am having an issue with the loading part: the type of some subresources is not right. Mainly a class I have called “NonNetDocument” (as I am using some networking documents between the client and Firestore Firebase). They are saved in the correct way:
Hey, I should’ve specified the issue better. Let me give you some more info:
results in printing
“<Resource#-9223371998451727003>
null
null”
and an error: “Invalid get index ‘doc_name’ (on base: ‘Resource’)”
As you can see from my save file, there is definitely a property by the name “doc_name”, but it cannot be accessed like this.
Also casting it to GDScript results in as well.
So, what I’m saying is, that the NonNetObject for whatever reason is loaded as a Resource, which probably clears its fields specific to the NonNetObject class, thus not allowing me to use them.
Another thing that may be causing the issue: I am loading the cache as a dictionary. So there can’t really be specific types that I cast to anywhere.