Update Cinematic Manager, Hud Manager, fix log verbosity issue, update PauseMenu
This commit is contained in:
@@ -951,7 +951,19 @@ MonoBehaviour:
|
|||||||
m_TargetGraphic: {fileID: 500835664005007083}
|
m_TargetGraphic: {fileID: 500835664005007083}
|
||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 3083882772934295339}
|
||||||
|
m_TargetAssemblyTypeName: UI.PauseMenu, AppleHillsScripts
|
||||||
|
m_MethodName: HideDevOptions
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
--- !u!1 &4393876071688605581
|
--- !u!1 &4393876071688605581
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -56,7 +56,13 @@ namespace Bootstrap
|
|||||||
// Subscribe to boot progress for real-time updates during bootstrap
|
// Subscribe to boot progress for real-time updates during bootstrap
|
||||||
CustomBoot.OnBootProgressChanged += OnBootProgressChanged;
|
CustomBoot.OnBootProgressChanged += OnBootProgressChanged;
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
_logVerbosity = DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>().bootstrapLogVerbosity;
|
_logVerbosity = DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>().bootstrapLogVerbosity;
|
||||||
|
#elif DEVELOPMENT_BUILD
|
||||||
|
_logVerbosity = LogVerbosity.Debug;
|
||||||
|
#elif RELEASE_BUILD
|
||||||
|
_logVerbosity = LogVerbosity.Warning;
|
||||||
|
#endif
|
||||||
|
|
||||||
// In debug mode, log additional information
|
// In debug mode, log additional information
|
||||||
if (debugMode)
|
if (debugMode)
|
||||||
|
|||||||
@@ -147,6 +147,8 @@ namespace Cinematics
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public PlayableDirector LoadAndPlayCinematic(string key, bool playPortraitMode)
|
public PlayableDirector LoadAndPlayCinematic(string key, bool playPortraitMode)
|
||||||
{
|
{
|
||||||
|
InitializeComponents();
|
||||||
|
|
||||||
// Load the asset via addressables
|
// Load the asset via addressables
|
||||||
var handle = Addressables.LoadAssetAsync<PlayableAsset>(key);
|
var handle = Addressables.LoadAssetAsync<PlayableAsset>(key);
|
||||||
var result = handle.WaitForCompletion();
|
var result = handle.WaitForCompletion();
|
||||||
|
|||||||
@@ -53,18 +53,34 @@ public class AudioManager : ManagedBehaviour, IPausable
|
|||||||
|
|
||||||
protected override void OnManagedAwake()
|
protected override void OnManagedAwake()
|
||||||
{
|
{
|
||||||
// Auto-registration with GameManager handled by ManagedBehaviour
|
// Initialize lists if they were not set in inspector
|
||||||
}
|
criticalVOSources = criticalVOSources ?? new List<AppleAudioSource>();
|
||||||
|
VOSources = VOSources ?? new List<AppleAudioSource>();
|
||||||
|
musicSources = musicSources ?? new List<AppleAudioSource>();
|
||||||
|
ambienceSources = ambienceSources ?? new List<AppleAudioSource>();
|
||||||
|
SFXSources = SFXSources ?? new List<AppleAudioSource>();
|
||||||
|
|
||||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
// Perform singleton-dependent initialization here
|
||||||
void Start()
|
if (QuickAccess.Instance != null)
|
||||||
{
|
{
|
||||||
_player = QuickAccess.Instance.PlayerGameObject;
|
_player = QuickAccess.Instance.PlayerGameObject;
|
||||||
|
if (QuickAccess.Instance.MainCamera != null)
|
||||||
|
{
|
||||||
_audioListener = QuickAccess.Instance.MainCamera.GetComponent<AudioListener>();
|
_audioListener = QuickAccess.Instance.MainCamera.GetComponent<AudioListener>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarning("[AudioManager] QuickAccess.Instance is null during OnManagedAwake. Some audio references may remain unset.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Diagnostic
|
||||||
foreach (AppleAudioSource _audioSource in criticalVOSources)
|
foreach (AppleAudioSource _audioSource in criticalVOSources)
|
||||||
{
|
{
|
||||||
Debug.Log("Found source: " + _audioSource.name);
|
Debug.Log("Found source: " + _audioSource.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Log("[AudioManager] OnManagedAwake completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAudioPauseBehavior(PauseBehavior newPauseBehavior)
|
public void SetAudioPauseBehavior(PauseBehavior newPauseBehavior)
|
||||||
|
|||||||
@@ -38,51 +38,33 @@ public class PlayerHudManager : ManagedBehaviour
|
|||||||
|
|
||||||
_instance = this;
|
_instance = this;
|
||||||
|
|
||||||
}
|
InitializeReferences();
|
||||||
|
|
||||||
protected override void OnManagedAwake()
|
|
||||||
{
|
|
||||||
InitializePostBoot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeReferences()
|
private void InitializeReferences()
|
||||||
{
|
{
|
||||||
|
currentCinematicPlayer = landscapeObject;
|
||||||
|
playableDirector = cinematicsParentObject.GetComponent<PlayableDirector>();
|
||||||
cinematicSprites = currentCinematicPlayer.GetComponent<Image>();
|
cinematicSprites = currentCinematicPlayer.GetComponent<Image>();
|
||||||
cinematicBackgroundSprites = CinematicBackground.GetComponent<Image>();
|
cinematicBackgroundSprites = CinematicBackground.GetComponent<Image>();
|
||||||
playableDirector = cinematicsParentObject.GetComponent<PlayableDirector>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializePostBoot()
|
private void UpateCinematicReferences(GameObject newCinematicPlayer)
|
||||||
{
|
|
||||||
// Initialize any dependencies that require other services to be ready
|
|
||||||
// For example, subscribe to SceneManagerService events if needed
|
|
||||||
|
|
||||||
|
|
||||||
Logging.Debug("[PlayerHudManager] Post-boot initialization complete");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnEnable()
|
|
||||||
{
|
|
||||||
// Subscribe to application quit event to ensure cleanup
|
|
||||||
Application.quitting += OnApplicationQuit;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnApplicationQuit()
|
|
||||||
{
|
{
|
||||||
|
currentCinematicPlayer = newCinematicPlayer;
|
||||||
|
cinematicSprites = currentCinematicPlayer.GetComponent<Image>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPortraitMode(bool portraitModeEnable)
|
public void SetPortraitMode(bool portraitModeEnable)
|
||||||
{
|
{
|
||||||
if (portraitModeEnable)
|
if (portraitModeEnable)
|
||||||
{
|
{
|
||||||
currentCinematicPlayer = portraitObject;
|
UpateCinematicReferences(portraitObject);
|
||||||
InitializeReferences();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentCinematicPlayer = landscapeObject;
|
UpateCinematicReferences(landscapeObject);
|
||||||
InitializeReferences();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user