Using Resources Folder

I would like to generate my levels based on a file with JSON objects on each line containing information for how each level should behave.

I have used the “resources” folder in the past, but in my searching I found that the resources folder is not a preferred way to store/fetch information.

Is there a better way for me to have these “level” objects saved in a lightweight way? (I have tried also saving the level information in a sperate prefab and creating a list of these various prefab variants. This seems way too heavy handed for something like this).

Thanks!

The recommended replacement for the Resources folder is Addressable Assets.

You still can use Resources, but addressables have some advantages in flexibility and maintainability.

If you’re just using a basic file like a json text file you can just use system.IO to get it from where ever in the system (probably the game folder)

It’s my understanding that if you want to make sure certain game files are included in the build in a way that makes them accessible through the standard file system, you need to put them in StreamingAssets