SoyBoy Standalone

¿How we can load the .json lvls in the Standalone version of SuperSoyBoy?

Hi @ventura

When you compile SuperSoyBoy for Windows, you simply place the level .JSON files under the “_Data” folder in the folder where you have the built executable file.

Here is an example of two level files I placed in the built version of the saving-data chapter project for Super Soy Boy to give you an idea of where the files should go.

Yes thank you, but if i want to share the standalone game with other people, they will load the game without lvl’s if they don’t do this trick before open it.

Hey @ventura

Yes that is true. There are a variety of different ways you could handle this though. For example:

  1. Make an installer that installs the game into a location on their machine, and then also copies in the level .JSON files you wish to distribute.
  2. Change the code in the GameManager that loads the level content to look in the Resources of the game for the file, and use Resources.Load() to read in the JSON files instead of from the Data location. That way when the standalone build is done, the level files get bundled in with the resources of the built binaries.

You can read more about Resources.Load() here - Unity - Scripting API: Resources.Load

But I think it is also covered in one of the chapters in the book too!

Cheers