Code Monkey home page Code Monkey logo

savesystemtutorial's Introduction

教程视频链接 Tutorial Videos:

YouTube -

Part 1: https://youtu.be/tci13zedrzw

Part 2: https://youtu.be/1vOuh3_ZXRQ

Bilibili -

Part 1: https://www.bilibili.com/video/BV1nQ4y1z7pZ

Part 2: https://www.bilibili.com/video/BV1Cb4y1b71G


Unity Save System Tutorial

About Branch Version

The main branch is the initialization version of the tutorial project. You could download it and follow me along with the tutorial video. The completed branch is the final project for references. Feel free to download and use them.

In this tutorial you will learn:

  1. Two methods to implement data saving and loading in Unity Engine: (1) PlayerPrefs; (2) JSON;
  2. Their pros and cons
  3. Build a flexible save system

Unity存档系统教程

关于工程文件分支

Main分支的工程文件是教程项目的初始化版本。 你可以使用这个工程跟着我从头开始构建存档系统。 Completed分支的工程文件是教程结束时的完整工程项目,供大家参考。


在这个小教程中你将学到:

  1. 两种Unity引擎中常见的数据存取方法:(1) PlayerPrefs; (2) JSON;
  2. 它们的优缺点
  3. 构建一个高适用性的存档系统

参考资料 References Links

PlayerPrefs - Unity Documentation - https://docs.unity3d.com/ScriptReference/PlayerPrefs.html

MenuItem - Unity Documentation - https://docs.unity3d.com/ScriptReference/MenuItem.html

JSON - https://www.json.org/

JSON(中文) - https://www.json.org/json-zh.html

JSON Example - https://json.org/example.html

JsonUtility - Unity Documentation - https://docs.unity3d.com/ScriptReference/JsonUtility.html

JsonUtility.ToJson - Unity Documentation - Scripting API - https://docs.unity3d.com/ScriptReference/JsonUtility.ToJson.html

JsonUtility.FromJson - Unity Documentation - Scripting API - https://docs.unity3d.com/ScriptReference/JsonUtility.FromJson.html

JsonUtility.FromJsonOverwrite - Unity Documentation - Scripting API - https://docs.unity3d.com/ScriptReference/JsonUtility.FromJsonOverwrite.html

Script Serialization - Unity Documentation - Manual - https://docs.unity3d.com/Manual/script-Serialization.html

Application.persistentDataPath - Unity Documentation - Scripting API - https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html

Path.Combine - Microsoft .NET Docs - https://docs.microsoft.com/en-us/dotnet/api/system.io.path.combine

File.WriteAllText - Microsoft .NET Docs - https://docs.microsoft.com/en-us/dotnet/api/system.io.file.writealltext

File.ReadAllText - Microsoft .NET Docs - https://docs.microsoft.com/en-us/dotnet/api/system.io.file.readalltext

File.Delete - Microsoft .NET Docs - https://docs.microsoft.com/en-us/dotnet/api/system.io.file.delete

try-catch - Microsoft .NET Docs - https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/try-catch

savesystemtutorial's People

Contributors

ryanxudev avatar xqc1122 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.