Author a bootstrap scene first approach
This commit is contained in:
@@ -68,6 +68,7 @@ namespace UI
|
||||
private void Awake()
|
||||
{
|
||||
_instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
|
||||
if (loadingScreenContainer == null)
|
||||
loadingScreenContainer = gameObject;
|
||||
|
||||
@@ -81,9 +81,11 @@ namespace UI
|
||||
return;
|
||||
|
||||
bool isMainMenu = levelName.ToLower().Contains("mainmenu");
|
||||
gameObject.SetActive(!isMainMenu);
|
||||
bool isStartingLevel = levelName.ToLower().Contains("startingscene");
|
||||
|
||||
if(!isMainMenu)
|
||||
gameObject.SetActive(!(isMainMenu || isStartingLevel));
|
||||
|
||||
if(!isMainMenu && !isStartingLevel)
|
||||
HidePauseMenu(false); // Ensure menu is hidden when switching to a game level
|
||||
|
||||
Logging.Debug($"[PauseMenu] Setting pause menu active: {!isMainMenu} for scene: {levelName}");
|
||||
|
||||
Reference in New Issue
Block a user