Book Image

Unity Game Development Scripting

By : Kyle D'Aoust
Book Image

Unity Game Development Scripting

By: Kyle D'Aoust

Overview of this book

Table of Contents (17 chapters)
Unity Game Development Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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