浏览代码

Merge pull request #167 from Unity-Technologies/siyaoH/1.17/fixAndroid

fix
/main
GitHub 4 年前
当前提交
1a6e0de3
共有 4 个文件被更改,包括 10 次插入6 次删除
  1. 10
      com.unity.uiwidgets/Runtime/engine/UIWidgetsMessageManager.cs
  2. 2
      com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs
  3. 2
      com.unity.uiwidgets/Runtime/material/selectable_text.cs
  4. 2
      com.unity.uiwidgets/Runtime/widgets/framework.cs

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


readonly Dictionary<string, MethodChannelMessageDelegate> _methodChannelMessageDelegates =
new Dictionary<string, MethodChannelMessageDelegate>();
public static UIWidgetsMessageManager instance {
get { return _instance; }
get {
if (_instance == null) {
ensureUIWidgetsMessageManagerIfNeeded();
}
return _instance;
}
}
internal static void ensureUIWidgetsMessageManagerIfNeeded() {

return;
}
var managerObj = new GameObject("__UIWidgetsMessageManager");
managerObj.AddComponent<UIWidgetsMessageManager>();
var component = managerObj.AddComponent<UIWidgetsMessageManager>();
_instance = component;
}
#if UNITY_IOS || UNITY_ANDROID || UNITY_WEBGL

2
com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs


}
protected virtual void Update() {
UIWidgetsMessageManager.ensureUIWidgetsMessageManagerIfNeeded();
if (!_viewMetricsCallbackRegistered) {
_viewMetricsCallbackRegistered = true;
UIWidgetsMessageManager.instance?.AddChannelMessageDelegate("ViewportMetricsChanged",

2
com.unity.uiwidgets/Runtime/material/selectable_text.cs


}
}
class SelectableText : StatefulWidget {
public class SelectableText : StatefulWidget {
public SelectableText(
string data,

2
com.unity.uiwidgets/Runtime/widgets/framework.cs


fn();
}
_element.markNeedsBuild();
_element?.markNeedsBuild();
}
public virtual void deactivate() {

正在加载...
取消
保存