SaveLoad using managed lifecycle

This commit is contained in:
Michal Pikulski
2025-11-04 20:01:27 +01:00
parent 379a033d6b
commit bb68d1fd31
23 changed files with 1083 additions and 648 deletions

View File

@@ -1,4 +1,4 @@
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using AppleHills.Data.CardSystem;
using Core;
@@ -52,7 +52,6 @@ namespace UI.CardSystem
private void Awake()
{
_cardManager = CardSystemManager.Instance;
_cardAlbumUI = FindFirstObjectByType<CardAlbumUI>();
// Set up button listeners
@@ -86,6 +85,14 @@ namespace UI.CardSystem
HideAllCardBacks();
}
protected override void OnManagedAwake()
{
base.OnManagedAwake();
// Safe to access manager instance here
_cardManager = CardSystemManager.Instance;
}
/// <summary>
/// Cache all card back buttons from the container
/// </summary>