Skip to content

Commit 8d088fc

Browse files
committed
feat: add OnDestroy method to clear view stack
1 parent bf2de6b commit 8d088fc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Assets/PurrUI/Runtime/ViewStack.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,5 +547,10 @@ private static IEnumerator RunExitTransition(MonoView view, IEnumerator transiti
547547
yield return transition;
548548
if (view) view.DestroyMe();
549549
}
550+
551+
private void OnDestroy()
552+
{
553+
Clear();
554+
}
550555
}
551556
}

0 commit comments

Comments
 (0)