示例#1
0
        public static void SaveData(object dataObj)
        {
            var dataType = dataObj.GetType();

            SaveRoot saveRoot = new SaveRoot();

            saveRoot._SaveKey = dataType.Name;

            saveRoot._ChildNode = GetNodesForSave(dataObj);

            SaveRoot(saveRoot);
        }
示例#2
0
        public static void SaveRoot(SaveRoot root)
        {
            string saveStr = "";

            foreach (var child in root._ChildNode)
            {
                saveStr += DataPackSave.SaveSplitChars[0] + child.ToSaveString(1);
            }
            saveStr = saveStr.Substring(1);
            Debug.Log("SaveRoot:" + saveStr);
            LocalSave.Save(root._SaveKey, saveStr);
        }