DEG-143[FIx] UpgradeManager null 오류 수정

This commit is contained in:
99jamin 2025-05-13 17:18:41 +09:00
parent a6146d068f
commit bb87d5948a
7 changed files with 28 additions and 8 deletions

BIN
Assets/KJM/KJM.unity (Stored with Git LFS)

Binary file not shown.

BIN
Assets/KJM/KJM_Test/Upgrade/Prefabs/UpgradeTestObject.prefab (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e3768143d1fc350408bf60fc9e748b56
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -156,8 +156,19 @@ public class UpgradeManager : Singleton<UpgradeManager>
//배경 패널 비활성화
StartCoroutine(CoFade(backgroundRectTransform.gameObject, 0.7f,0f,0.2f));
if (SceneManager.GetActiveScene().name == "ReDungeon")
{
StartCoroutine(DelayedSceneChange()); // n초 대기 후 전환
}
}
//씬 전환 대기 코루틴
private IEnumerator DelayedSceneChange()
{
yield return new WaitForSeconds(2f);
GameManager.Instance.ChangeToHomeScene();
}
/// <summary>
/// 페이드 애니메이션 코루틴
@ -231,7 +242,8 @@ public class UpgradeManager : Singleton<UpgradeManager>
protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
if(canvas == null)
canvas = FindObjectOfType<Canvas>();
}
}

View File

@ -113,10 +113,7 @@ public class DungeonLogic : MonoBehaviour
_player.SetState(PlayerState.Win);
// TODO: 강화 시스템으로 넘어가고 일상 맵으로 이동
UpgradeManager.Instance.StartUpgrade(); //강화 시스템 호출
GameManager.Instance.PanelManager.GetPanel("ClearPanelBG");
StartCoroutine(DelayedSceneChange()); // 5초 대기 후 전환
}
}

BIN
Assets/KSH/ReHousing.unity (Stored with Git LFS)

Binary file not shown.

View File

@ -61,5 +61,6 @@ public class ClearPanelController : PanelController, IPointerClickHandler
{
onCompleted?.Invoke();
Hide();
UpgradeManager.Instance.StartUpgrade();
}
}