static AssetStoreContext() { AssetStoreContext.s_StandardPackageRegExp = new Regex("/Standard Packages/(Character\\ Controller|Glass\\ Refraction\\ \\(Pro\\ Only\\)|Image\\ Effects\\ \\(Pro\\ Only\\)|Light\\ Cookies|Light\\ Flares|Particles|Physic\\ Materials|Projectors|Scripts|Standard\\ Assets\\ \\(Mobile\\)|Skyboxes|Terrain\\ Assets|Toon\\ Shading|Tree\\ Creator|Water\\ \\(Basic\\)|Water\\ \\(Pro\\ Only\\))\\.unitypackage$", RegexOptions.IgnoreCase); AssetStoreContext.s_GeneratedIDRegExp = new Regex("^\\{(.*)\\}$"); AssetStoreContext.s_InvalidPathCharsRegExp = new Regex("[^a-zA-Z0-9() _-]"); AssetStoreContext.GetInstance(); }
public static void OpenURL(string url) { AssetStoreWindow assetStoreWindow = AssetStoreWindow.Init(); assetStoreWindow.InvokeJSMethod("document.AssetStore", "openURL", new object[] { url }); AssetStoreContext.GetInstance().initialOpenURL = url; }
public void UpdateDockStatusIfNeeded() { if (this.m_IsDocked != base.docked) { this.m_IsDocked = base.docked; if (this.scriptObject != null) { AssetStoreContext.GetInstance().docked = base.docked; this.InvokeJSMethod("document.AssetStore", "updateDockStatus", new object[0]); } } }
private void Update() { if (this.m_ShouldRetryInitialURL) { this.m_ShouldRetryInitialURL = false; string initialOpenURL = AssetStoreContext.GetInstance().initialOpenURL; if (!string.IsNullOrEmpty(initialOpenURL)) { AssetStoreWindow.OpenURL(initialOpenURL); } } }
public static void OpenURL(string url) { AssetStoreWindow window = Init(); bool shouldDefer = !window.initialized; window.InvokeJSMethod("document.AssetStore", "openURL", url); AssetStoreContext.GetInstance().initialOpenURL = url; if (shouldDefer) { // Ugly hack - help, asset store team! window.ScheduleOpenURL(TimeSpan.FromSeconds(3)); } }
public void UpdateDockStatusIfNeeded() { if (m_IsDocked != docked) { m_IsDocked = docked; if (scriptObject != null) { AssetStoreContext.GetInstance().docked = docked; InvokeJSMethod("document.AssetStore", "updateDockStatus"); } } }
public static void OpenURL(string url) { AssetStoreWindow window = Init(); bool flag = !window.initialized; object[] args = new object[] { url }; window.InvokeJSMethod("document.AssetStore", "openURL", args); AssetStoreContext.GetInstance().initialOpenURL = url; if (flag) { window.ScheduleOpenURL(TimeSpan.FromSeconds(3.0)); } }
public void UpdateDockStatusIfNeeded() { if (this.m_IsDocked == this.docked) { return; } this.m_IsDocked = this.docked; if (!((UnityEngine.Object) this.scriptObject != (UnityEngine.Object)null)) { return; } AssetStoreContext.GetInstance().docked = this.docked; this.InvokeJSMethod("document.AssetStore", "updateDockStatus"); }
void Update() { if (!m_ShouldRetryInitialURL) { return; } m_ShouldRetryInitialURL = false; string url = AssetStoreContext.GetInstance().initialOpenURL; if (!string.IsNullOrEmpty(url)) { OpenURL(url); } }
public static void OpenURL(string url) { object[] args = new object[] { url }; Init().InvokeJSMethod("document.AssetStore", "openURL", args); AssetStoreContext.GetInstance().initialOpenURL = url; }
static AssetStoreContext() { AssetStoreContext.GetInstance(); }