Faerdan
Topic Author
Posts: 55
Joined: 02 Oct 2015, 09:11
Location: Galway, Ireland
Contact:

Loading NSB files from outside of working directory

14 Apr 2016, 11:51

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
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Loading NSB files from outside of working directory

15 Apr 2016, 10:37

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?
 
Faerdan
Topic Author
Posts: 55
Joined: 02 Oct 2015, 09:11
Location: Galway, Ireland
Contact:

Re: Loading NSB files from outside of working directory

15 Apr 2016, 13:49

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!
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Loading NSB files from outside of working directory

15 Apr 2016, 18:44

Great!

Who is online

Users browsing this forum: No registered users and 0 guests