예제 #1
0
        //保存数据到本地
        public static void SaveDataToLocal()
        {
            Directory.CreateDirectory(DataPah);
            EntitasData data = new EntitasData();

            data.ViewPath           = ViewPath;
            data.ServicePath        = ServicePath;
            data.SystemPath         = SystemPath;
            data.ServiceManagerPath = ServiceManagerPath;
            data.GameFeaturePath    = GameFeaturePath;
            data.InputFeaturePath   = InputFeaturePath;
            data.ViewFeaturePath    = ViewFeaturePath;
            AssetDatabase.CreateAsset(data, DataPah + DataFileName);
        }
예제 #2
0
        //从本地读取数据
        private static void ReadDataFromLocal()
        {
            EntitasData data = AssetDatabase.LoadAssetAtPath <EntitasData>(DataPah + DataFileName);

            if (data != null)
            {
                ViewPath           = data.ViewPath;
                ServicePath        = data.ServicePath;
                SystemPath         = data.SystemPath;
                ServiceManagerPath = data.ServiceManagerPath;
                GameFeaturePath    = data.GameFeaturePath;
                InputFeaturePath   = data.InputFeaturePath;
                ViewFeaturePath    = data.ViewFeaturePath;
            }
        }