Skip to content

Commit 0e0b004

Browse files
committed
fix(UIManager): 为池复用路径分配独立的请求序列号
池复用时不再传固定 -1,改为分配新的 serialId,使每次打开请求可观测。
1 parent 7b5139f commit 0e0b004

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Runtime/UIManager.Open.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ protected override async Task<IUIForm> InnerOpenUIFormAsync(string uiFormAssetPa
100100
var uiFormInstanceObject = m_InstancePool.Spawn(assetPath);
101101
if (uiFormInstanceObject != null)
102102
{
103-
// 如果对象池存在
104-
return InternalOpenUIForm(-1, uiFormAssetPath, uiFormAssetName, uiFormType, uiFormInstanceObject.Target, pauseCoveredUIForm, false, 0f, userData, isFullScreen);
103+
// 池复用也分配新的请求序列号,确保每次打开请求可观测。
104+
int serialId = ++m_Serial;
105+
return InternalOpenUIForm(serialId, uiFormAssetPath, uiFormAssetName, uiFormType, uiFormInstanceObject.Target, pauseCoveredUIForm, false, 0f, userData, isFullScreen);
105106
}
106107

107108
var uiForm = InnerLoadUIFormAsync(uiFormAssetPath, uiFormType, pauseCoveredUIForm, userData, isFullScreen, uiFormAssetName, assetPath);

0 commit comments

Comments
 (0)