Home | Documentation | Atomic Chat | Github

Resource Loading JSON Files


Does anyone know if the engine supports loading of JSON files as resource descriptors - For things like sprites?

I’ve just downloaded the editor and i’m quite keen to do some development using C#.
I’ve noticed in the Shape Blaser example an XML file is used to describe a texture atlas.

SpriteSheet2D sheet = cache.GetResource<SpriteSheet2D>("Sprites/AtomicBlasterSprites.xml");

Ideally I would like to use a JSON file instead of an XML.
Does the engine support this?

Thanks in advance!


Atomic inherits its use of XML files from Urho3d, on which it is based. The XML material definitions and such are basically the same as the Urho ones, so that’s the most common format used.

SpriteSheet2D seems to have support for loading from different formats though, it looks for the file extension .plist, .xml or .json to decide which loader code to use.
If you create a JSON file with the equivalent of the XML file, you should be able to load it in the same way.


That’s awesome. I’ll give Urho3d a read up and check what support it has as well.