Skip to content

同时一次发起两次OpenUI 时,在 isMultiple=false时还是会出现两个页面 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DreamChaseAndVera opened this issue May 10, 2025 · 4 comments

Comments

@DreamChaseAndVera
Copy link

isMultiple=false 情况下,如果打开UI,如果第二次OpenUI发起时,上一次还在加载中,m_UIFormsBeingLoaded 会同时存在 serialId 不同的两个相同的 uiFormAssetName

AlianBlank added a commit to GameFrameX/com.gameframex.unity.ui.fairygui that referenced this issue May 12, 2025
AlianBlank added a commit to GameFrameX/com.gameframex.unity.ui that referenced this issue May 12, 2025
@AlianBlank
Copy link
Collaborator

已修复

@AlianBlank
Copy link
Collaborator

需要同时更新UI包和UI实现包

@AlianBlank AlianBlank reopened this May 12, 2025
@AlianBlank
Copy link
Collaborator

AlianBlank commented May 12, 2025

当测试代码如下。没有等待的时候。才会触发该BUG

 private static async UniTask LoadUI()
        {
            await GameApp.FUIPackage.AddPackageAsync(Utility.Asset.Path.GetUIPackagePath(FUIPackage.UICommon));
            LoadUIAsync();
            LoadUIAsync();
        }

        public static async void LoadUIAsync()
        {
            // 打开登录界面, 正式流程
            await GameApp.UI.OpenAsync<UIHomeTitle>(Utility.Asset.Path.GetUIPath(FUIPackage.UIHome));
        }

AlianBlank added a commit to GameFrameX/com.gameframex.unity.ui.ugui that referenced this issue May 12, 2025
@AlianBlank
Copy link
Collaborator

如果使用以下代码,则不会出现重复界面的问题

 private static async UniTask LoadUI()
        {
            await GameApp.FUIPackage.AddPackageAsync(Utility.Asset.Path.GetUIPackagePath(FUIPackage.UICommon));
            await LoadUIAsync();
            await LoadUIAsync();
        }

        public static async Task LoadUIAsync()
        {
            // 打开登录界面, 正式流程
            await GameApp.UI.OpenAsync<UIHomeTitle>(Utility.Asset.Path.GetUIPath(FUIPackage.UIHome));
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants