Final touchups to the lifecycle management
This commit is contained in:
@@ -15,9 +15,6 @@ namespace UI.Core
|
||||
[Header("Page Settings")]
|
||||
public string PageName;
|
||||
|
||||
// UI pages load after UI infrastructure (UIPageController is priority 50)
|
||||
public override int ManagedAwakePriority => 200;
|
||||
|
||||
// Events using System.Action instead of UnityEvents
|
||||
public event Action OnTransitionInStarted;
|
||||
public event Action OnTransitionInCompleted;
|
||||
|
||||
@@ -37,8 +37,6 @@ namespace UI.Core
|
||||
private PlayerInput _playerInput;
|
||||
private InputAction _cancelAction;
|
||||
|
||||
public override int ManagedAwakePriority => 50; // UI infrastructure
|
||||
|
||||
internal override void OnManagedAwake()
|
||||
{
|
||||
// Set instance immediately (early initialization)
|
||||
@@ -50,10 +48,8 @@ namespace UI.Core
|
||||
Logging.Debug("[UIPageController] Initialized");
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
internal override void OnManagedDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
|
||||
// Clean up cached instances
|
||||
foreach (var cachedPage in _prefabInstanceCache.Values)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user