public static void SaveData(string RecordName, RecordTable data) { ResourceIOTool.WriteStringByFile( PathTool.GetAbsolutePath(ResLoadType.Persistent, PathTool.GetRelativelyPath(c_directoryName, RecordName, c_expandName)), RecordTable.Serialize(data)); #if UNITY_EDITOR UnityEditor.AssetDatabase.Refresh(); #endif }
public void SaveData(string recordName, RecordTable data) { var path = PathTool.GetRelativelyPath(m_directoryName, recordName, m_expandName); ResourceIOTool.WriteStringByFile(PathTool.GetAbsolutePath(ResLoadLocation.Persistent, path), RecordTable.Serialize(data)); #if UNITY_EDITOR if (!Application.isPlaying) { UnityEditor.AssetDatabase.Refresh(); } #endif }
static int Serialize(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); RecordTable arg0 = (RecordTable)ToLua.CheckObject(L, 1, typeof(RecordTable)); string o = RecordTable.Serialize(arg0); LuaDLL.lua_pushstring(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static void SaveData(string RecordName, RecordTable data) { #if !UNITY_WEBGL IOTool.WriteStringByFile(Utility.Path.GetCombinePath(UnityUtility.Path.PersistentDataPath, Constant.DevicePlatform.GetCurDevicePlatformPath(), c_directoryName, RecordName + "." + c_expandName), RecordTable.Serialize(data)); #endif }