private bool FindWebView(string webViewUrl, out WebView webView) { webView = null; string key = WebViewEditorWindow.MakeUrlKey(webViewUrl); return(this.m_RegisteredViews.TryGetValue(key, out webView)); }
public static void RunTestScript(string path) { string sourcesPath = "file:///" + path; JSProxyMgr.GetInstance().AddGlobalObject("WebViewTestFunctions", new WebViewTestFunctions()); WebViewEditorWindow.Create <WebViewEditorWindowTabs>("Test Window", sourcesPath, 0, 0, 0, 0).OnBatchMode(); }
public static void RunTestScript(string path) { string sourcesPath = "file:///" + path; WebViewEditorWindow webViewEditorWindow = WebViewEditorWindow.Create <WebViewTestFunctions>("Test Window", sourcesPath, 0, 0, 0, 0); webViewEditorWindow.OnBatchMode(); }
public static T CreateBase <T>(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) where T : WebViewEditorWindow { T window = EditorWindow.GetWindow <T>(title); WebViewEditorWindow.CreateWindowCommon <T>((T)((object)window), title, sourcesPath, minWidth, minHeight, maxWidth, maxHeight); window.Show(); return(window); }
public static T CreateUtility <T>(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) where T : WebViewEditorWindow { T t = ScriptableObject.CreateInstance <T>(); t.m_GlobalObjectTypeName = typeof(T).FullName; WebViewEditorWindow.CreateWindowCommon <T>((T)((object)t), title, sourcesPath, minWidth, minHeight, maxWidth, maxHeight); t.ShowUtility(); return(t); }
public static WebViewEditorWindow CreateBase(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) { WebViewEditorWindow window = EditorWindow.GetWindow <WebViewEditorWindow>(title); window.minSize = new Vector2((float)minWidth, (float)minHeight); window.maxSize = new Vector2((float)maxWidth, (float)maxHeight); window.m_InitialOpenURL = sourcesPath; window.m_GlobalObjectTypeName = null; window.Init(); window.Show(); return(window); }
public static WebViewEditorWindow Create <T>(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) where T : new() { WebViewEditorWindow window = ScriptableObject.CreateInstance <WebViewEditorWindow>(); window.titleContent = new GUIContent(title); window.minSize = new Vector2((float)minWidth, (float)minHeight); window.maxSize = new Vector2((float)maxWidth, (float)maxHeight); window.m_InitialOpenURL = sourcesPath; window.m_GlobalObjectTypeName = typeof(T).FullName; window.Init(); window.Show(); return(window); }
public static void RunTestScript(string path) { WebViewEditorWindow.Create <WebViewTestFunctions>("Test Window", "file:///" + path, 0, 0, 0, 0).OnBatchMode(); }
public WebView GetWebViewFromURL(string url) { string key = WebViewEditorWindow.MakeUrlKey(url); return(this.m_RegisteredViews[key]); }
private void RegisterWebviewUrl(string webViewUrl, WebView view) { string key = WebViewEditorWindow.MakeUrlKey(webViewUrl); this.m_RegisteredViews[key] = view; }
protected void UnregisterWebviewUrl(string webViewUrl) { string key = WebViewEditorWindow.MakeUrlKey(webViewUrl); this.m_RegisteredViews[key] = null; }
protected void UnregisterWebviewUrl(string webViewUrl) { this.m_RegisteredViews[WebViewEditorWindow.MakeUrlKey(webViewUrl)] = (WebView)null; }