Do you want to load Urho resources from this archive?
Yes.
For example, there are
XMLFile
resources in this bundle that I would have liked to have been able to simply load by using the standard API as follows
XMLFile xml = GetSubsystem<ResourceCache>()->LoadResource<XMLFile>( "UI/Constants.xml" );
My hope was that I would be able to supply the
ResourceCache
with a variety of
container
implementations and it simply asks these
containers
if a resource by the name exists and if so, the
container
would then know how to stream the contents into the
Resource
object.
Or it’s enough for you to load the archive into
MapFile
itself?
I’m not sure I understand this.
Code snippet that you posted here should work fine if MapFile is derived from Resource.
Actually, it doesn’t and reports that the resource cannot be loaded.
This is because
ResourceCache
calls
GetFile
that leads to trying to create
File
object that refers to that path; however it cannot create the
File
because internally its all based on looking in packages and the file system. Since that file exists inside a custom bundle file, Urho3D doesn’t seem to have a way to extend the resource subsystem with custom archive format types.