Skip to content

Commit 0cb9ed3

Browse files
committed
[修复]1. 修复重复打开一个界面出现两个界面的问题
GameFrameX/GameFrameX.Unity#27
1 parent 5680f17 commit 0cb9ed3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Runtime/UIManager.Open.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ private async Task<IUIForm> InnerOpenUIFormAsync(string uiFormAssetPath, Type ui
112112
GameFrameworkGuard.NotNull(m_UIFormHelper, nameof(m_UIFormHelper));
113113
GameFrameworkGuard.NotNull(uiFormType, nameof(uiFormType));
114114
var uiFormAssetName = uiFormType.Name;
115-
int serialId = ++m_Serial;
116115
string assetPath = PathHelper.Combine(uiFormAssetPath, uiFormAssetName);
117116
UIFormInstanceObject uiFormInstanceObject = m_InstancePool.Spawn(assetPath);
118117
if (uiFormInstanceObject != null && isMultiple == false)
119118
{
120119
// 如果对象池存在
121-
return InternalOpenUIForm(serialId, uiFormAssetName, uiFormType, uiFormInstanceObject.Target, pauseCoveredUIForm, false, 0f, userData, isFullScreen);
120+
return InternalOpenUIForm(-1, uiFormAssetName, uiFormType, uiFormInstanceObject.Target, pauseCoveredUIForm, false, 0f, userData, isFullScreen);
122121
}
123122

123+
int serialId = ++m_Serial;
124124
m_UIFormsBeingLoaded.Add(serialId, uiFormAssetName);
125125
OpenUIFormInfo openUIFormInfo = OpenUIFormInfo.Create(serialId, uiFormType, pauseCoveredUIForm, userData, isFullScreen);
126126
if (uiFormAssetPath.IndexOf(Utility.Asset.Path.BundlesDirectoryName, StringComparison.OrdinalIgnoreCase) < 0)

0 commit comments

Comments
 (0)