Page 1 of 1

Loading NSB files from outside of working directory

Posted: 14 Apr 2016, 11:51
by Faerdan
Hi,

As part of the modding system in UNION I compile XAML files into NSB files at runtime, allowing modders to easily change the game UIs.

With the Noesis build system I can save NSB files anywhere, but within the Noesis API I can only seem to add Resource paths (using GUI.AddResourceProvider()) which are within the current working directory.

As the game will most often be installed in the Program Files directory, which I will not have write access to, I need to be able to load NSB files from a location outside of the working directory (from Application Data for example).

How can I do this?

I'm using the C# API.


Thanks,

Mark

Re: Loading NSB files from outside of working directory

Posted: 15 Apr 2016, 10:37
by jsantos
The C# API is a bit limited yet regarding the implementation of custom providers but the provided function GUI.AddResourceProvider() should work fine because it allows relative and absolute paths. Did you try using an absolute path?

Re: Loading NSB files from outside of working directory

Posted: 15 Apr 2016, 13:49
by Faerdan
I had tried using an absolute path with GUI.AddResourceProvider(), but I realise now that there must have been something wrong with the path I provided.

I've tried it again it and it works. Thanks very much!

Re: Loading NSB files from outside of working directory

Posted: 15 Apr 2016, 18:44
by jsantos
Great!