|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using Unity.UIWidgets.engine; |
|
|
|
using Unity.UIWidgets.engine2; |
|
|
|
using Unity.UIWidgets.external.simplejson; |
|
|
|
using Unity.UIWidgets.widgets; |
|
|
|
using RawImage = UnityEngine.UI.RawImage; |
|
|
|
|
|
|
|
namespace Unity.UIWidgets.engine2 { |
|
|
|
public enum UIWidgetsWindowType { |
|
|
|
|
|
|
_ShowDebugLog = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool _viewMetricsCallbackRegistered; |
|
|
|
|
|
|
|
void _handleViewMetricsChanged(string method, List<JSONNode> args) { |
|
|
|
_wrapper.displayMetrics.onViewMetricsChanged(); |
|
|
|
Window.instance.onMetricsChanged?.Invoke(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!_viewMetricsCallbackRegistered) { |
|
|
|
_viewMetricsCallbackRegistered = true; |
|
|
|
UIWidgetsMessageManager.instance?.AddChannelMessageDelegate("ViewportMetricsChanged", |
|
|
|
_handleViewMetricsChanged); |
|
|
|
} |
|
|
|
|
|
|
|
Input_Update(); |
|
|
|
} |
|
|
|