fzhangtj 6 年前
当前提交
14cf548e
共有 3 个文件被更改,包括 3 次插入47 次删除
  1. 2
      Runtime/engine/UIWidgetsMessageManager.cs
  2. 5
      Runtime/engine/UIWidgetsPanel.cs
  3. 43
      Samples/UIWidgetSample/TextInput.unity

2
Runtime/engine/UIWidgetsMessageManager.cs


if (name != this._lastObjectName) {
#if UNITY_IOS || UNITY_ANDROID
if (!Application.isEditor) {
UIWidgetsMessageSetObjectName(this._lastObjectName);
UIWidgetsMessageSetObjectName(name);
}
this._lastObjectName = name;
#endif

5
Runtime/engine/UIWidgetsPanel.cs


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

void Update() {
this._displayMetrics.Update();
UIWidgetsMessageManager.ensureUIWidgetsMessageManagerIfNeeded();
if (EventSystem.current != null && EventSystem.current.currentSelectedGameObject != this.gameObject) {
this.unfocusIfNeeded();
}

43
Samples/UIWidgetSample/TextInput.unity


m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1777916081}
m_CullTransparentMesh: 0
--- !u!1 &1829967422
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1829967424}
- component: {fileID: 1829967423}
m_Layer: 0
m_Name: messageManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1829967423
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1829967422}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: efd031068fc9d41d6b4c165afaaa25ba, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1829967424
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1829967422}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
正在加载...
取消
保存