Haruma-K / UnityScreenNavigator

Library for screen transitions, transition animations, transition history stacking, and screen lifecycle management in Unity's uGUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Find Page(Modal/Sheet)?

seoyeon01 opened this issue · comments

Is there way to find the Page(Modal / Sheet) from container(or static method way like find container)?
If it's not, is it by design reason?

For example,
(I haven't tested it in detail, so there's probably something wrong with it.)
image

duplicate pageName(Identifier) may have a problem.
But in most cases, pageName seems to be used in a unique way.

or is there a better way?
I'm wondering if there is room for this usage to cause problems.

In an ideal scenario, you should hold onto the pageId obtained during the OnLoad at the time of a push operation and use that.

https://github.com/Haruma-K/UnityScreenNavigator/blob/a8acf7c84b70732558fbcefd2305e0ddd2126e55/Assets/UnityScreenNavigator/Runtime/Core/Page/PageContainer.cs#L190C71-L190C77

There's also an overload for Pop that allows specifying an pageId

public AsyncProcessHandle Pop(bool playAnimation, string destinationPageId)