public override void Awake(object param1 = null, object param2 = null, object param3 = null) { m_SumTime = 0; //持有面板 m_Panel = GameObject.GetComponent <HotFixPanel>(); //进度设置为0 m_Panel.m_Image.fillAmount = 0; // 文本提示框 m_Panel.m_Text.text = string.Format("{0:F}M/S", 0); //回调 HotPatchManager.Instance.ServerInfoError += ServerInfoError; HotPatchManager.Instance.ItemError += ItemError; #if UNITY_EDITOR StartOnFinish(); #else if (HotPatchManager.Instance.ComputeUnPackFile()) { m_Panel.m_SliderTopText.text = "解压中..."; HotPatchManager.Instance.StartUnackFile(() => { m_SumTime = 0; HotFix(); }); } else { HotFix(); } #endif }
void Start() { #if UNITY_WEBPLAYER && !UNITY_EDITOR Logger.Temp.WriteLog("CheckUpdateInWeb"); TryLoadAssets(); #else if (AppConfig.USE_HOT_FIX) { GameObject hotFixRoot = GameObject.Find("HotFixRoot").gameObject; hotFixPanel = hotFixRoot.transform.Find("HotFixPanel").GetComponent <HotFixPanel>(); hotFixPanel.gameObject.SetActive(true); //StartCoroutine(downloadVersionListFile(System.IO.Path.Combine(ResourceLoader.RemoteAssetBundleUrl, "TestVersionList.json"))); StartCoroutine(downloadVersionListFile(System.IO.Path.Combine(ResourceLoader.RemoteAssetBundleUrl, "VersionList.json"))); } else { TryLoadAssets(); } #endif }