Example #1
0
 private static FinalPatchData GetFinalPatchData()
 {
     if (s_finalPatchData == null)
     {
         s_finalPatchData = FinalPatchData.Load();
     }
     return(s_finalPatchData);
 }
Example #2
0
        internal static void Init(FinalPatchData data)
        {
            if (s_initialized)
            {
                return;
            }

            s_initialized = true;
            s_data        = data;
        }
Example #3
0
        private void Awake()
        {
            DontDestroyOnLoad(gameObject);

            FinalPatchData data = Resources.Load <FinalPatchData>("FinalPatchData");

            FinalPool.Init(data);
            FinalLoader.Init(data);
            FinalPatcher.Init(data, deployDataUrl, channel);
        }
Example #4
0
        internal static void Init(FinalPatchData data, string deployDataUrl, string channel)
        {
            if (s_initialized)
            {
                return;
            }

            s_initialized   = true;
            s_data          = data;
            s_deployDataUrl = deployDataUrl;
            s_channel       = channel;

            if (s_data.patchAutoPatch)
            {
                AutoPatch();
            }
        }
Example #5
0
        public static FinalPatchData Load()
        {
            FinalPatchData data = Resources.Load <FinalPatchData>("FinalPatchData");

            if (data == null)
            {
#if UNITY_EDITOR
                data = CreateInstance <FinalPatchData>();
                string dir = Path.GetDirectoryName(FinalPatchConst.FINAL_PATCH_DATA_PATH);
                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }
                UnityEditor.AssetDatabase.CreateAsset(data, FinalPatchConst.FINAL_PATCH_DATA_PATH);
                UnityEditor.AssetDatabase.Refresh();
#endif
            }
            return(data);
        }
Example #6
0
        private void OnEnable()
        {
            FinalPatchData                  = FinalPatchData.Load();
            FinalPatchEditorData            = FinalPatchEditorData.Load();
            Localization.OnLanguageChanged += OnLanguageChanged;

            m_mainTabSet = new TabSet(new Tab[]
            {
                new Tab(new BuildTabView(this)),
                new Tab(new DeployTabView(this)),
                new Tab(new AdvancedTabView(this)),
            }, FinalPatchEditorData.activeTab);
            m_mainTabSet.OnActiveIndexChanged += OnActiveTabChanged;

            m_tabLabels = new string[]
            {
                "tab_label_build",
                "tab_label_deploy",
                "tab_label_advanced",
            };

            OnLanguageChanged();
        }
Example #7
0
 internal static void Init(FinalPatchData data)
 {
     s_data = data;
 }