Include a pre-populated csv with compile?

Discussion and help for Easy Save 3
Post Reply
Canley
Posts: 14
Joined: Tue Nov 08, 2022 11:22 am

Include a pre-populated csv with compile?

Post by Canley »

Hi,

I'm building an app using ES3 spreadsheets quite a lot, and they are working great :) Mostly they are for storing user-created data.

I want to include some tables of data to bundle with the app. I have some long lists of items I'm referencing in the app. I could do what I need by populating lists using c#, but would prefer to keep those lists in CSVs for ease of making changes to data in future builds.

Is this possible? I've tried adding a CSV file with required data to my assets folder but ES3 doesn't see the file. I'd be happy to store it in player prefs or something but don't think it would be included with my build in that case?

Is there a way to include the file with my build and then reference the path?

Thanks heaps,
Canley
Canley
Posts: 14
Joined: Tue Nov 08, 2022 11:22 am

Re: Include a pre-populated csv with compile?

Post by Canley »

(Building for iOS by the way)
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: Include a pre-populated csv with compile?

Post by Joel »

Hi there,

For this you can use a Unity Resources folder:
https://learn.unity.com/tutorial/assets ... setbundles

You can find information on loading from a Resources folder here:
https://docs.moodkie.com/easy-save-3/es ... resources/

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Canley
Posts: 14
Joined: Tue Nov 08, 2022 11:22 am

Re: Include a pre-populated csv with compile?

Post by Canley »

Thanks for that Joel :)

I'd read a bit about resources and the shift to addressable and am finding it confusing. I'm not clear on how to incorporate ES3 Settings with it.

After playing around a bit I think I'll stick with hard coding the data into a c# script.

Thanks for the help - I'm just not experienced enough to understand it I think. I'll manage - hard coding will work, it's just more cumbersome.

Cheers,
Canley
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: Include a pre-populated csv with compile?

Post by Joel »

Hi there,

Just to clarify, your use case is one of the situations where using Resources is still valid, so you don't need to worry about addressables. However, take whichever method is easiest for you :)

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Canley
Posts: 14
Joined: Tue Nov 08, 2022 11:22 am

Re: Include a pre-populated csv with compile?

Post by Canley »

Oh thanks Joel :)

(btw sorry for the long delay in replying - have been on leave)
Post Reply