Read from Resources , GetFile

Discussion and help for Easy Save 3
Post Reply
Cruz182
Posts: 3
Joined: Tue Jan 05, 2016 7:35 pm

Read from Resources , GetFile

Post by Cruz182 »

Hi,

So, here's my problem, I am trying to get files from the Resource folder but I can the message "NotSupportedException: ES3.GetFiles can only be used when the location is set to File or Cache."

Code: Select all

var settings = new ES3Settings();
settings.location = ES3.Location.Resources;
mapsSavedFiles = ES3.GetFiles("Maps/", settings);
So these map files are supposed to be there just to be loaded once but not altered. Is there any way to use these files and display their names in a list sort of thing?

I can perfectly use the GetFiles on the FIle location.

Thank you.
User avatar
Joel
Moodkie Staff
Posts: 4851
Joined: Wed Nov 07, 2012 10:32 pm

Re: Read from Resources , GetFile

Post by Joel »

Hi there,

It’s not possible to use GetFiles with Resources because Unity provides no way to get the names of all assets in Resources. Instead you would need to hardcode your own list of names.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply