浏览代码

update

/main
fzhangtj 6 年前
当前提交
76d4bdff
共有 2 个文件被更改,包括 13 次插入3 次删除
  1. 15
      Runtime/engine/UIWidgetsMessageManager.cs
  2. 1
      Runtime/engine/UIWidgetsPanel.cs

15
Runtime/engine/UIWidgetsMessageManager.cs


using System.Collections.Generic;
using System.Runtime.InteropServices;
using Unity.UIWidgets.service;
using UnityEngine;
namespace Unity.UIWidgets.engine {

public static UIWidgetsMessageManager instance {
get { return _instance; }
}
internal static void ensureUIWidgetsMessageManagerIfNeeded() {
if (!Application.isPlaying) {
return;
}
if (UIWidgetsMessageManager.instance != null) {
return;
}
var managerObj = new GameObject("__UIWidgetsMessageManager");
managerObj.AddComponent<UIWidgetsMessageManager>();
}
string _lastObjectName;

void UpdateNameIfNeed() {
var name = this.gameObject.name;
if (name != this._lastObjectName) {
this._lastObjectName = name;
this._lastObjectName = name;
#endif
}
}

1
Runtime/engine/UIWidgetsPanel.cs


protected override void OnEnable() {
base.OnEnable();
UIWidgetsMessageManager.ensureUIWidgetsMessageManagerIfNeeded();
//Disable the default touch -> mouse event conversion on mobile devices
Input.simulateMouseWithTouches = false;

正在加载...
取消
保存