SaveLoad using managed lifecycle
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user