Exemple #1
0
        /// <summary>
        /// 保存数据到本地
        /// </summary>
        public static void SaveDataToLocal()
        {
            Directory.CreateDirectory(dataPath);
            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, dataPath + dataFileName);
        }
Exemple #2
0
        /// <summary>
        /// 从本地读取数据
        /// </summary>
        public static void ReadDataFromLocal()
        {
            EntitasData data = AssetDatabase.LoadAssetAtPath <EntitasData>(dataPath + 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;
            }
        }
Exemple #3
0
 public Comp()
 {
     EntitasData = EntitasData.Create <TComponentType>();
 }