뽑기 결과 화면 상태에서 로비에서 다시 뽑기 화면으로 복귀할 때 갑자기 화면이 바뀌는게 매우 어색합니다.

This commit is contained in:
Ino 2025-12-19 12:40:10 +09:00
parent 7cb297b482
commit 6d8200b214
2 changed files with 20 additions and 8 deletions

View File

@ -815,9 +815,9 @@ MonoBehaviour:
m_OnClick: m_OnClick:
m_PersistentCalls: m_PersistentCalls:
m_Calls: m_Calls:
- m_Target: {fileID: 1703079399} - m_Target: {fileID: 2013608479}
m_TargetAssemblyTypeName: LobbyUI, Assembly-CSharp m_TargetAssemblyTypeName: GachaUI, Assembly-CSharp
m_MethodName: Go_Home m_MethodName: OnClick_Close
m_Mode: 1 m_Mode: 1
m_Arguments: m_Arguments:
m_ObjectArgument: {fileID: 0} m_ObjectArgument: {fileID: 0}

View File

@ -54,8 +54,6 @@ public class GachaUI : uScrollViewMgr
Set_UI(false); Set_UI(false);
Init_GachaAnim(); Init_GachaAnim();
Set_Video(); Set_Video();
} }
void Set_UI(bool updateSlider) void Set_UI(bool updateSlider)
@ -333,18 +331,27 @@ public class GachaUI : uScrollViewMgr
Application.OpenURL("https://mergehero.notion.site/2cce9deec1718075a553d4f9012e538a"); Application.OpenURL("https://mergehero.notion.site/2cce9deec1718075a553d4f9012e538a");
} }
public void OnClick_Close()
{
Set_Video(() =>
{
LobbyUI.Ins.Go_Home();
gameObject.SetActive(false);
});
}
#region #region
public RawImage rawImage; public RawImage rawImage;
public VideoPlayer videoPlayer; public VideoPlayer videoPlayer;
public GameObject[] gos_off_isPlaying; public GameObject[] gos_off_isPlaying;
void Set_Video() void Set_Video(Action end = null)
{ {
StartCoroutine(PrepareVideo()); StartCoroutine(PrepareVideo(end));
} }
// 1. 비디오 준비 및 첫 프레임 보여주기 // 1. 비디오 준비 및 첫 프레임 보여주기
IEnumerator PrepareVideo() IEnumerator PrepareVideo(Action end = null)
{ {
videoPlayer.Prepare(); videoPlayer.Prepare();
@ -361,8 +368,13 @@ public class GachaUI : uScrollViewMgr
// 1프레임만 기다림 (화면에 그려질 시간 확보) // 1프레임만 기다림 (화면에 그려질 시간 확보)
yield return null; yield return null;
videoPlayer.frame = 0;
videoPlayer.Pause(); videoPlayer.Pause();
videoPlayer.time = 0; // 혹시 시간이 흘렀다면 0초로 강제 고정 videoPlayer.time = 0; // 혹시 시간이 흘렀다면 0초로 강제 고정
yield return null;
yield return null;
end?.Invoke();
} }
// 2. 외부에서 이 함수를 호출하여 재생 시작 // 2. 외부에서 이 함수를 호출하여 재생 시작