浏览代码

抽奖动画适配修改

zhangyuqian 1 年之前
父节点
当前提交
09776d071e

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxVideoView.cs

@@ -27,6 +27,10 @@ namespace GFGGame
             handle = YooAssets.LoadAssetSync<GameObject>(path);
             _ui = handle.InstantiateSync(UGUIManager.Instance.desktop.transform);
             imgVideo = _ui.transform.Find("ImgVideo").GetComponent<RawImage>();
+            Vector2 imgVideoSizeDelta = imgVideo.rectTransform.sizeDelta;
+            imgVideoSizeDelta.y = Screen.height;
+            imgVideoSizeDelta.x = (VideoWidth / VideoHeight) * imgVideoSizeDelta.y;
+            imgVideo.rectTransform.sizeDelta = imgVideoSizeDelta;
 
 
             BtnSkipVertical = _ui.transform.Find("BtnSkipVertical").GetComponent<Button>();

+ 3 - 3
GameClient/Assets/ResIn/UUI/UILuckyBox.prefab

@@ -200,10 +200,10 @@ RectTransform:
   m_Father: {fileID: 8091540498621025810}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 1, y: 1}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
+  m_SizeDelta: {x: 762, y: 798}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &720217753082088938
 CanvasRenderer: