#Json Data or Tres file?

5 messages · Page 1 of 1 (latest)

grand grove
#

I want to dynamically populate details of Dialog Alerts from some data, but the data would be kind of similar to an array of JSON objects (key/value pairs).

Should I work on parsing JSON data with gdscript? Or is the "godot" way to do it with TRES files somehow?

grand grove
#

gotcha that makes sense. If I want a field on the resource to be an array of key values, is the best way with a class to define the structure? And attach a script to the resource that exports that class as a field?

grand grove
#

Gotcha. I guess in my case I want one of my resources to ahve a property: "Events"...which would be an array of another resource "Event"

#

Kinda like how JSON you can do an array of objects.

#

I think that can work? 🤔