forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebScriptObject.cs
More file actions
41 lines (36 loc) · 807 Bytes
/
Copy pathWebScriptObject.cs
File metadata and controls
41 lines (36 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using UnityEngine;
namespace UnityEditor.Web
{
internal class WebScriptObject : ScriptableObject
{
private WebView m_WebView;
public WebView webView
{
get
{
return this.m_WebView;
}
set
{
this.m_WebView = value;
}
}
private WebScriptObject()
{
this.m_WebView = null;
}
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);
}
public bool processMessage(string jsonRequest, WebViewV8CallbackCSharp callback)
{
return this.ProcessMessage(jsonRequest, callback);
}
}
}