O'Reilly logo

Unity Game Development Scripting by Kyle D'Aoust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Saving and loading

To let the player save and load data within our game, we will implement the save system that we created in Chapter 7, Creating Save and Load Systems.

Adding the script

Drag the FLAT_Save_System script and drop it on the main camera. There will be no default values for this script, so we will need to set them as follows:

  • SfileName to Test.txt
  • Sdirectory to C:\Users\USERNAME\Desktop\
  • Drag-and-drop the First Person Controller onto the Player slot

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required