Пример #1
0
 private static void LoadData()
 {
     if (_tableDatas == null)
     {
         _tableDatas = Resources.Load <TableToolDatas>(RESOURCES_ASSET_PATH);
     }
 }
Пример #2
0
        /// <summary>
        /// 保存配置文件
        /// </summary>
        public static void SaveAsset(TableToolDatas tableDatas)
        {
            //if (tableDatas == null || tableDatas.tableDatas.Count == 0) return;
            //AssetDatabase.DeleteAsset(TableTools.ASSET_PATH);
            //AssetDatabase.CreateAsset(tableDatas, TableTools.ASSET_PATH);

            EditorUtility.SetDirty(_tableDatas);
            AssetDatabase.SaveAssets();
        }
Пример #3
0
 /// <summary>
 /// 读取本地序列化文件
 /// </summary>
 private static void LoadAsset()
 {
     _tableDatas = AssetDatabase.LoadAssetAtPath <TableToolDatas>(TableTool.ASSET_PATH);
 }