using UnityEngine; using UnityEngine.UI; using UnityEngine.Video; using YooAsset; using GFGGame.Launcher; using System.Collections; using System.Collections.Generic; namespace GFGGame { public class LuckyBoxVideoView : SingletonMonoBase { private const float VideoWidth = 1080f; private const float VideoHeight = 1920f; private GameObject _ui; private AssetOperationHandle handle; private RawFileOperationHandle videoHandle; private RawImage imgVideo; private Button BtnSkipVertical; private VideoPlayer videoPlayer; private List _rewardList; public void Show(List _reward = null) { MusicManager.Instance.Stop(); MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath("luckyboxMp3", "mp3")); FairyGUI.GRoot.inst.touchable = false; string path = ResPathUtil.GetUUIPrefabPath("UILuckyBox"); handle = YooAssets.LoadAssetSync(path); _ui = handle.InstantiateSync(UGUIManager.Instance.desktop.transform); imgVideo = _ui.transform.Find("ImgVideo").GetComponent(); 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