浏览代码

ios & isolate

/siyaoH-1.17-PlatformMessage
siyao 4 年前
当前提交
07c3cc87
共有 2 个文件被更改,包括 13 次插入2 次删除
  1. 5
      com.unity.uiwidgets/Runtime/engine/UIWidgetsMessageManager.cs
  2. 10
      com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanel.cs

5
com.unity.uiwidgets/Runtime/engine/UIWidgetsMessageManager.cs


using Unity.UIWidgets.external.simplejson;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.service;
using System.Runtime.InteropServices;
using Unity.UIWidgets.ui;
using UnityEngine;

}
void UpdateNameIfNeed() {
#if UNITY_ANDROID || UNITY_WEBGL
#if UNITY_IOS || UNITY_ANDROID || UNITY_WEBGL
var name = gameObject.name;
if (name != _lastObjectName) {

}
void OnUIWidgetsMethodMessage(string message) {
using (Isolate.getScope(TextInput._currentConnection.isolate)) {
using (Isolate.getScope(UIWidgetsPanel.anyIsolate)) {
JSONObject jsonObject = (JSONObject) JSON.Parse(message);
string channel = jsonObject["channel"].Value;
string method = jsonObject["method"].Value;

10
com.unity.uiwidgets/Runtime/engine2/UIWidgetsPanel.cs


public partial class UIWidgetsPanel : RawImage, IUIWidgetsWindow {
static List<UIWidgetsPanel> panels = new List<UIWidgetsPanel>();
static public Isolate anyIsolate {
get {
if (panels.Count == 0) {
return null;
}
return panels[0]._wrapper.isolate;
}
}
static void registerPanel(UIWidgetsPanel panel) {
panels.Add(panel);
}

正在加载...
取消
保存