Skip to content

Commit a3a6551

Browse files
committed
Fix: GraphyManager.OnDestroy() hides G_Singleton<T>.OnDestroy()
1 parent 55a8d11 commit a3a6551

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Runtime/GraphyManager.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,12 @@ private void Start()
547547
Init();
548548
}
549549

550-
private void OnDestroy()
550+
protected override void OnDestroy()
551551
{
552552
G_IntString.Dispose();
553553
G_FloatString.Dispose();
554+
555+
base.OnDestroy();
554556
}
555557

556558
private void Update()

Runtime/Util/G_Singleton.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static T Instance
5959

6060
#region Methods -> Unity Callbacks
6161

62-
void Awake()
62+
protected virtual void Awake()
6363
{
6464
if( _instance != null )
6565
{
@@ -71,7 +71,7 @@ void Awake()
7171
}
7272
}
7373

74-
void OnDestroy()
74+
protected virtual void OnDestroy()
7575
{
7676
if( _instance == this )
7777
{

0 commit comments

Comments
 (0)