比较提交

...
此合并请求有变更与目标分支冲突。
/com.unity.uiwidgets/package.json
/com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs

2 次代码提交

作者 SHA1 备注 提交日期
siyao 098e6ee0 Merge branch 'master' into siyaoH/1.17/rawTouches 3 年前
siyao 9238edb3 update engine 3 年前
共有 5 个文件被更改,包括 113 次插入18 次删除
  1. 47
      Samples/UIWidgetsSamples_2019_4/Assets/Scene/ImageTest.unity
  2. 1
      com.unity.uiwidgets/package.json
  3. 61
      com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs
  4. 11
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/MobileTouchSample.cs.meta
  5. 11
      Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/MobileTouchSample.cs.meta

47
Samples/UIWidgetsSamples_2019_4/Assets/Scene/ImageTest.unity


m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Texture: {fileID: 0}
m_Texture: {fileID: 1525330782}
m_UVRect:
serializedVersion: 2
x: 0

fonts: []
devicePixelRatioOverride: 0
fonts: []
--- !u!222 &847097471
CanvasRenderer:
m_ObjectHideFlags: 0

m_GameObject: {fileID: 847097468}
m_CullTransparentMesh: 0
--- !u!28 &1525330782
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_TextureFormat: 0
m_MipCount: 1
m_IsReadable: 1
m_IgnoreMasterTextureLimit: 0
m_IsPreProcessed: 0
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_AlphaIsTransparency: 0
m_ImageCount: 0
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 0
m_WrapV: 0
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
image data: 0
_typelessdata:
m_StreamData:
offset: 0
size: 0
path:
--- !u!1 &1548023132
GameObject:
m_ObjectHideFlags: 0

1
com.unity.uiwidgets/package.json


"unity": "2019.4",
"description": "UIWidgets allows you to build beautiful cross-platform apps through Unity",
"dependencies": {
"com.unity.modules.uiwidgets": "1.0.0"
}
}

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


UIWidgetsWindowType getWindowType();
}
public class Configurations {
private Dictionary<string, TextFont> _textFonts = new Dictionary<string, TextFont>();

public object fontsToObject() {
Dictionary<string, TextFont> settings = _textFonts;
if (settings == null || settings.Count == 0) {

#else
if (!File.Exists(assetAbsolutePath)) {
#endif
Debug.LogError($"The font asset (family: \"{setting.Key}\", path: \"{assetPath}\") is not found");
Debug.LogError(
$"The font asset (family: \"{setting.Key}\", path: \"{assetPath}\") is not found");
fontDic.Add("asset", value: setting.Value.fonts[j].asset);
}

#if !UNITY_EDITOR
CollectGarbageOnDemand();
#endif
#if !UNITY_EDITOR
// 8 MB
const long kCollectAfterAllocating = 8 * 1024 * 1024;

lastFrameMemory = mem;
}
#endif
#endregion
IEnumerator ReEnableUIWidgetsNextFrame() {

AddFont(family: font.family, font: font);
}
}
_wrapper.Initiate(this, width: _currentWidth, height: _currentHeight, dpr: _currentDevicePixelRatio,
_configurations: _configurations);
_configurations.Clear();

}
}
enum UIWidgetsInputMode
{
enum UIWidgetsInputMode {
Mouse,
Touch
}

}
void Input_OnEnable() {
UnityEngine.UIWidgets.InitUIWidgets.init();
UnityEngine.UIWidgets.RawTouchEvent += ProcessRawTouch;
enum TouchPhase {
Began = 0,
Moved = 1,
Stationary = 2,
Ended = 3,
Canceled = 4
}
void ProcessRawTouch(UnityEngine.UIWidgets.RawTouchEventParam param) {
var position = _getPointerPosition(new Vector2(param.x, param.y));
var pointerId = -1 - param.pointerId;
switch ((TouchPhase)param.phase) {
case TouchPhase.Began:
_wrapper.OnPointerDown(position, pointerId);
break;
case TouchPhase.Moved:
_wrapper.OnDrag(position, pointerId);
break;
case TouchPhase.Ended:
_wrapper.OnPointerUp(position, pointerId);
break;
default:
break;
}
}
UnityEngine.UIWidgets.RawTouchEvent -= ProcessRawTouch;
}
void Input_Update() {

if (_inputMode != UIWidgetsInputMode.Mouse) {
return;
}
var pos = _getPointerPosition(Input.mousePosition);
_wrapper.OnMouseMove(pos);
}

return;
}
var pos = _getPointerPosition(Input.mousePosition);
_wrapper.OnMouseScroll(Input.mouseScrollDelta, pos);
}

return;
}
D.assert(eventData.pointerId < 0);
_isEntered = true;
_lastMousePosition = Input.mousePosition;

if (_inputMode != UIWidgetsInputMode.Mouse) {
return;
}
#if UNITY_EDITOR || (!UNITY_IOS && !UNITY_ANDROID)
public void OnPointerDown(PointerEventData eventData) {
_convertPointerData(eventData, out var pos, out var pointerId);
_wrapper.OnPointerDown(pos, pointerId);

_convertPointerData(eventData, out var pos, out var pointerId);
_wrapper.OnDrag(pos, pointerId);
}
#else
public void OnPointerDown(PointerEventData eventData) {
}
public void OnPointerUp(PointerEventData eventData) {
}
public void OnDrag(PointerEventData eventData) {
}
#endif
}
}

11
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/MobileTouchSample.cs.meta


fileFormatVersion: 2
guid: 925efb3da7848c24a84e0306cdd8de3c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
Samples/UIWidgetsSamples_2019_4/Assets/WidgetsSample/MobileTouchSample.cs.meta


fileFormatVersion: 2
guid: 925efb3da7848c24a84e0306cdd8de3c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存