Beispiel #1
0
        private static void SetUserSetting()
        {
            PersistenceData.SavePrefsData("ASSET_PACKAGER_WHOLE_MODULE", wholeModule);

            RunningTimeData.SetRunningData(CommonKey.VERSION_LOCAL, version.ToString());
            RunningTimeData.Record();
        }
        private void OnGUI()
        {
            EditorGUILayout.LabelField("设置Lua文件加密Key:(至少16位,不足自动填充0)");
            string _keyLua = EditorGUILayout.TextField(PersistenceData.GetPrefsData("CRYPT_KEY", "abcdefghijklmnop12345678"));

            while (_keyLua.Length < 16)
            {
                _keyLua += "0";
            }
            PersistenceData.SavePrefsData("CRYPT_KEY", _keyLua);
        }
Beispiel #3
0
        private void GetUserSetting()
        {
            useMVC = PersistenceData.GetPrefsDataBool("CREATE_MODULE_USE_MVC");
            string _creaters = PersistenceData.GetPrefsData("CREATE_MODULE_CREATER");

            if (string.IsNullOrEmpty(_creaters))
            {
                creaters = Developer.未知;
            }
            else
            {
                creaters = (Developer)System.Enum.Parse(typeof(Developer), _creaters);
            }
        }
Beispiel #4
0
        private void Functions()
        {
            EditorGUILayout.BeginHorizontal();
            {
                if (GUILayout.Button("打包资源", GUILayout.Width(120)))
                {
                    changeds = null;
                    buidle++;
                    PersistenceData.SavePrefsData("LOCAL_VERSION_BUIDLE", buidle);
                    PackAssetBundles();
                }
            }
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(20);
        }
Beispiel #5
0
        private void ComponentOnBuildBundleIdentify()
        {
            CopyChannelFiles();
            ChannelData.SetByBundleid(bundleidf);
            if (useChannle > 0)
            {
                ChannelData.SetChannelByIndex(useChannle);
            }
            AssetDatabase.Refresh();

            if (!isDebug)
            {
                buidle++;
                PersistenceData.SavePrefsData("LOCAL_VERSION_BUIDLE", buidle);
            }
        }
Beispiel #6
0
        private void ComponentDataGetBundleIdentify()
        {
            //版本
            string _v = RunningTimeData.GetRunningData(CommonKey.VERSION_LOCAL, "0.0.0.0");

            version = new Version(_v);
            string _bu = DateTime.Now.ToString("MMdd");

            buidle = int.Parse(_bu);
            if (buidle > version.Build)
            {
                buidle = 0;
                PersistenceData.SavePrefsData("LOCAL_VERSION_BUIDLE", buidle);
            }

            buidle = PersistenceData.GetPrefsDataInt("LOCAL_VERSION_BUIDLE", 0);
        }
Beispiel #7
0
        private static void GetUserSetting()
        {
            wholeModule = PersistenceData.GetPrefsDataBool("ASSET_PACKAGER_WHOLE_MODULE");

            string _v = RunningTimeData.GetRunningData(CommonKey.VERSION_LOCAL, "2.0.0.0");

            version = new Version(_v);
            string _bu = DateTime.Now.ToString("MMdd");

            buidle = int.Parse(_bu);
            if (buidle > version.Build)
            {
                buidle = 0;
                PersistenceData.SavePrefsData("LOCAL_VERSION_BUIDLE", buidle);
            }

            buidle = PersistenceData.GetPrefsDataInt("LOCAL_VERSION_BUIDLE", 0);
        }
Beispiel #8
0
        public void Refresh()
        {
            bgm.mute = !PersistenceData.GetPrefsDataBool(CommonKey.SWITCH_MUSIC, true);
            bool _audio = !PersistenceData.GetPrefsDataBool(CommonKey.SWITCH_AUDIO, true);

            for (int i = 0; i < audios.Count; i++)
            {
                audios[i].mute = _audio;
                if (audios[i].isPlaying)
                {
                    continue;
                }

                audios[i].clip = null;
                PoolModule.instance.Push("AUDIO_PLAYER", audios[i].gameObject);
                //UtilityUnity.DestroyGameObject(audios[i].gameObject);
                audios.RemoveAt(i);
                i--;
            }
        }
Beispiel #9
0
        private void SetUserSetting()
        {
            ComponentDataSetServer();
            ComponentDataSetBundleIdentify();

            //基础模块(针对业务逻辑)
            string _baseJson = JsonMapper.ToJson(baseModule);

            RunningTimeData.SetRunningData("JSON_BASE_MODULE", _baseJson);

            //平台
            PersistenceData.SavePrefsData("BUNDLE_PLANTFORM", (int)bt);
            //是否debug版本
            PersistenceData.SavePrefsData("BUNDLE_ISDEBUG", isDebug);
            //全包含资源
            PersistenceData.SavePrefsData("BUNDLE_ISFULL", isFull);
            //分离体
            PersistenceData.SavePrefsData("BUNDLE_ISDEPART", buildDepartPackage);
            //不打新资源(不存在依然会打包资源)
            PersistenceData.SavePrefsData("BUNDLE_ISOLDRES", oldRes);
        }
Beispiel #10
0
        public void PlayAudio(AudioClip _audio)
        {
            AudioSource _as  = null;
            GameObject  _new = PoolModule.instance.Pop <GameObject>("AUDIO_PLAYER");

            if (_new == null)
            {
                _new = new GameObject(_audio.name);
                _as  = _new.AddComponent <AudioSource>();
            }
            else
            {
                _new.SetActive(true);
                _as = _new.GetComponent <AudioSource>();
            }
            UtilityUnity.SetParent(_new, autoListener);
            _as.clip = _audio;
            _as.mute = !PersistenceData.GetPrefsDataBool(CommonKey.SWITCH_AUDIO, true);
            _as.Play();
            Refresh();
            audios.Add(_as);
        }
Beispiel #11
0
        private void GetUserSetting()
        {
            ComponentDataGetServer();
            ComponentDataGetBundleIdentify();

            //基础模块(针对业务逻辑)
            string _baseJson = RunningTimeData.GetRunningData("JSON_BASE_MODULE", string.Empty);

            if (!string.IsNullOrEmpty(_baseJson))
            {
                baseModule = JsonMapper.ToObject <List <string> >(_baseJson);
            }

            //平台
            bt = (MBuidleTarget)PersistenceData.GetPrefsDataInt("BUNDLE_PLANTFORM", 0);
            //是否debug版本
            isDebug = PersistenceData.GetPrefsDataBool("BUNDLE_ISDEBUG", true);
            //全包含资源
            isFull = PersistenceData.GetPrefsDataBool("BUNDLE_ISFULL", false);
            //分离体
            buildDepartPackage = PersistenceData.GetPrefsDataBool("BUNDLE_ISDEPART", false);
            //不打新资源(不存在依然会打包资源)
            oldRes = PersistenceData.GetPrefsDataBool("BUNDLE_ISOLDRES", false);
        }
Beispiel #12
0
 private void SetUserSetting()
 {
     PersistenceData.SavePrefsData("CREATE_MODULE_USE_MVC", useMVC);
     PersistenceData.SavePrefsData("CREATE_MODULE_CREATER", creaters.ToString());
 }