本文旨在于简要分析Unity中的两种存档机制,即:PlayerPrefs数据持久化方法及Serialization数据序列化方法 较比与源项目,我另加了JSON方法.XML方法等及一些Unity设置,更便于读者在使用中理解Unity的存档机制.核心脚本为Game.cs 源项目地址:How to Save and Load a Game in Unity - raywenderlich 个人项目地址:BattleSave - SouthBegonia 一.PlayerPrefs 数据持久化方法 存…
详细可参考此篇博文: Unity序列化之XML,JSON--------合成与解析 简单例子(SiKi学院教程): using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public class Save{ //怪物位置和类型 public List<int> livingTargetPositions = new List<int>(…
不知道这个返回值意味着什么,反正只要用到Save/Load就会出现这个情况. 这个链接:http://forums.codeguru.com/showthread.php?354017-The-thread-Win32-Thread-(0x5a4)-has-exited-with-code-1-(0x1) 11楼: Usually it is but not necessarily. Sometimes exit code flags certain condition, not an erro…