예제 #1
0
        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();
        }
예제 #2
0
 public bool ProcessMessage(string jsonRequest, WebViewV8CallbackCSharp callback)
 {
     return(this.m_WebView != null && JSProxyMgr.GetInstance().DoMessage(jsonRequest, delegate(object result)
     {
         string result2 = JSProxyMgr.GetInstance().Stringify(result);
         callback.Callback(result2);
     }, this.m_WebView));
 }
예제 #3
0
        public static void RunTestScript(string path)
        {
            var url = "file:///" + path;

            JSProxyMgr.GetInstance().AddGlobalObject("WebViewTestFunctions", new WebViewTestFunctions());
            var window = WebViewEditorWindowTabs.Create <WebViewEditorWindowTabs>("Test Window", url, 0, 0, 0, 0);

            window.OnBatchMode();
        }
예제 #4
0
 public override void Init()
 {
     if (m_GlobalObject == null && !string.IsNullOrEmpty(m_GlobalObjectTypeName))
     {
         var instanceType = Type.GetType(m_GlobalObjectTypeName);
         if (instanceType != null)
         {
             m_GlobalObject = ScriptableObject.CreateInstance(instanceType);
             JSProxyMgr.GetInstance().AddGlobalObject(m_GlobalObject.GetType().Name, m_GlobalObject);
         }
     }
 }
예제 #5
0
 public void Init()
 {
     if ((this.m_GlobalObject == null) && !string.IsNullOrEmpty(this.m_GlobalObjectTypeName))
     {
         System.Type type = System.Type.GetType(this.m_GlobalObjectTypeName);
         if (type != null)
         {
             this.m_GlobalObject = Activator.CreateInstance(type);
             JSProxyMgr.GetInstance().AddGlobalObject(this.m_GlobalObject.GetType().Name, this.m_GlobalObject);
         }
     }
 }
 public override void Init()
 {
     if ((this.m_GlobalObject == null) && !string.IsNullOrEmpty(base.m_GlobalObjectTypeName))
     {
         System.Type type = System.Type.GetType(base.m_GlobalObjectTypeName);
         if (type != null)
         {
             this.m_GlobalObject = ScriptableObject.CreateInstance(type);
             JSProxyMgr.GetInstance().AddGlobalObject(this.m_GlobalObject.GetType().Name, this.m_GlobalObject);
         }
     }
 }
 public bool ProcessMessage(string jsonRequest, WebViewV8CallbackCSharp callback)
 {
     if (m_WebView != null)
     {
         return(JSProxyMgr.GetInstance().DoMessage(jsonRequest, (object result) =>
         {
             string res = JSProxyMgr.GetInstance().Stringify(result);
             callback.Callback(res);
         }, m_WebView
                                                   ));
     }
     return(false);
 }
예제 #8
0
 public bool ProcessMessage(string jsonRequest, WebViewV8CallbackCSharp callback)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     WebScriptObject.\u003CProcessMessage\u003Ec__AnonStoreyA3 messageCAnonStoreyA3 = new WebScriptObject.\u003CProcessMessage\u003Ec__AnonStoreyA3();
     // ISSUE: reference to a compiler-generated field
     messageCAnonStoreyA3.callback = callback;
     if ((Object)this.m_WebView != (Object)null)
     {
         // ISSUE: reference to a compiler-generated method
         return(JSProxyMgr.GetInstance().DoMessage(jsonRequest, new JSProxyMgr.ExecCallback(messageCAnonStoreyA3.\u003C\u003Em__1D4), this.m_WebView));
     }
     return(false);
 }
예제 #9
0
 static EditorProjectAccess()
 {
     JSProxyMgr.GetInstance().AddGlobalObject("unity/project", new EditorProjectAccess());
 }
 static TroubleshooterAccess()
 {
     JSProxyMgr.GetInstance().AddGlobalObject("/unity/editor/troubleshooter", new TroubleshooterAccess());
 }
예제 #11
0
 static ClipboardAccess()
 {
     JSProxyMgr.GetInstance().AddGlobalObject("unity/ClipboardAccess", new ClipboardAccess());
 }
예제 #12
0
 public static void DoTasks()
 {
     JSProxyMgr.GetInstance().ProcessTasks();
 }