Example #1
0
        public IEnumerator ShowScreen_WhenPanelShown_PanelIsVisible()
        {
            bool isPanelShown = false;

            uiFrame.Initialize();
            PanelA panelAPrefab = AssetDatabase.LoadAssetAtPath <PanelA>(PanelAPath);

            uiFrame.RegisterScreen(panelAPrefab);
            PanelA panelAInstance = uiFrame.GetComponentInChildren <PanelA>(true);

            async void ShowPanel()
            {
                await uiFrame.ShowScreen <PanelA>();

                isPanelShown = true;
            }

            ShowPanel();

            yield return(new WaitUntil(() => isPanelShown));

            Assert.IsTrue(panelAInstance.IsVisible);
            yield return(null);
        }