Issue Loading from the Resources Folder

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
daklab
Posts: 3
Joined: Mon Nov 04, 2013 4:25 am

Issue Loading from the Resources Folder

Post by daklab »

I'm simply trying to load ES2 generated saved file from the Resources folder, but with no luck. I've searched on the forum for help and this is the closest related post I found: http://www.moodkie.com/forum/viewtopic. ... urces#p601, but it doesn't solve my problem.

I sent you an email previously (prior to purchasing ES2) and you sent me this example:

Code: Select all

string myString = ES2.Load<string>("myFile.bytes?tag=myTag&savelocation=resources"); 
I cannot get it to work and I'm wondering what I'm missing. I have confirmed that I can actually save and load a file, but only using the default settings (on my machine the file gets saved to an AppData directory on my Windows machine via the Application.persistentDataPath default). The save call I make looks like this:

Code: Select all

ES2.Save("test", "myTestFile.bytes?tag=myTag");
What I did next was manually move that file into my Resources folder in my project (from what I can understand this is the only way to get an ES2 saved file into that folder as saving to that folder doesn't work). I then try to load from the Resources folder via:

Code: Select all

string myString = ES2.Load<string>("myTestFile.bytes?tag=myTag&savelocation=resources");
but I get the error ES2NotFoundException: The data, tag, file or folder you are looking for does not exist. Please ensure that ES2.Exists(string identifier) returns true before calling this method.. I understand that it is saying that file doesn't exist but it should.

What am I doing wrong? Where can I view a working example of ES2 loading from the Resources folder?
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Issue Loading from the Resources Folder

Post by Joel »

Hi there,

We've managed to replicate your problem and we're currently looking into it. We think a few modifications we made in the previous version may have disabled the Resources functionality.
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Issue Loading from the Resources Folder

Post by Joel »

We've found what was causing the bug and we're going to submit an update to the Asset Store today, so it'll hopefully be available before the end of the week.

We'll also put a guide to Resources in our docs as it's only currently documented in the ES2Settings and Parameter pages.

Edit: Documentation for Resources is done and can be found here.

All the best,
Joel
daklab
Posts: 3
Joined: Mon Nov 04, 2013 4:25 am

Re: Issue Loading from the Resources Folder

Post by daklab »

The original issue is fixed but I believe there is an additional issue. I can load from the Resources file as desired, but only if the myFile.bytes is at the top level within the Resources folder. If I have the myFile.bytes file nested in another directory, I'm unable to access it or confirm it exists via the ES2.Exists("/myFolder/myFile.bytes?savelocation=resources"). Is this broken? Or is there a limit to only having files loaded from the top level Resources directory? If so, I believe this should be improved to accommodate files nested in directories.
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Issue Loading from the Resources Folder

Post by Joel »

Hi there,

My apologies, for some reason that bug made it's way past our unit tests. I've just submitted an update to the Asset Store which should address this, and with any luck will be available by the end of the week.

All the best,
Joel
Locked