/// <summary> /// /// </summary> public static void Create(string assetCode, string localVersion) { m_InfoReady = false; m_LatestVersion = null; m_AssetCode = assetCode; m_LocalVersion = localVersion; vp_UpdateDialog window = (vp_UpdateDialog)EditorWindow.GetWindow(typeof(vp_UpdateDialog), true); window.titleContent.text = "Check for Updates"; window.minSize = new Vector2(m_DialogSize.x, m_DialogSize.y); window.maxSize = new Vector2(m_DialogSize.x, m_DialogSize.y); window.position = new Rect( (Screen.currentResolution.width / 2) - (m_DialogSize.x / 2), (Screen.currentResolution.height / 2) - (m_DialogSize.y / 2), m_DialogSize.x, m_DialogSize.y); window.Show(); window.m_Icon = m_UFPSIcon; m_ReleaseNotesPath = "http://www.opsive.com/assets/UFPS/hub/assets/" + m_AssetCode + "/releasenotes"; m_InfoFile = new WWW("http://www.opsive.com/assets/UFPS/content/assets/" + m_AssetCode + "/info.txt"); }
/// <summary> /// /// </summary> public static void Create(string assetCode, string localVersion) { m_InfoReady = false; m_LatestVersion = null; m_AssetCode = assetCode; m_LocalVersion = localVersion; vp_UpdateDialog window = (vp_UpdateDialog)EditorWindow.GetWindow(typeof(vp_UpdateDialog), true); window.titleContent.text = "Check for Updates"; window.minSize = new Vector2(m_DialogSize.x, m_DialogSize.y); window.maxSize = new Vector2(m_DialogSize.x, m_DialogSize.y); window.position = new Rect( (Screen.currentResolution.width / 2) - (m_DialogSize.x / 2), (Screen.currentResolution.height / 2) - (m_DialogSize.y / 2), m_DialogSize.x, m_DialogSize.y); window.Show(); window.m_Icon = m_UFPSIcon; m_ReleaseNotesPath = "http://legacy.opsive.com/assets/UFPS/hub/assets/" + m_AssetCode + "/releasenotes"; #if UNITY_2018_3_OR_NEWER m_InfoFile = UnityEngine.Networking.UnityWebRequest.Get("http://legacy.opsive.com/assets/UFPS/content/assets/" + m_AssetCode + "/info.txt"); m_InfoFile.SendWebRequest(); #else m_InfoFile = new WWW("http://legacy.opsive.com/assets/UFPS/content/assets/" + m_AssetCode + "/info.txt"); #endif }