From 92808879aec1ba6cc5f7dde23f9204e2d91af087 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 13 二月 2025 16:44:34 +0800
Subject: [PATCH] 0312 修复异步打开同一个界面可能导致蒙版错乱问题
---
System/WindowBase/Window.cs | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/System/WindowBase/Window.cs b/System/WindowBase/Window.cs
index 86e163d..9a0d7e7 100644
--- a/System/WindowBase/Window.cs
+++ b/System/WindowBase/Window.cs
@@ -308,6 +308,24 @@
if (windowTimer > windowInfo.tween.duration)
{
OnAfterOpen();
+ //妫�鏌ヨ挋鐗堟槸鍚︽甯�
+ try
+ {
+ if (windowMask != null)
+ {
+ Debug.Log("windowMask:" + windowMask.transform.GetSiblingIndex() + " rectTransform:" + rectTransform.GetSiblingIndex() + " name:" + this.rectTransform.name);
+ if (windowMask.transform.GetSiblingIndex() >= rectTransform.GetSiblingIndex())
+ {
+ windowMask.transform.SetSiblingIndex(rectTransform.GetSiblingIndex());
+ }
+ }
+ }
+ catch (System.Exception ex)
+ {
+ OperationLogCollect.Instance.BugReportSys(ex.ToString());
+ Debug.LogError(ex.StackTrace);
+ }
+
try
{
WindowCenter.Instance.NotifyAfterOpen(this);
@@ -328,6 +346,24 @@
else
{
OnAfterOpen();
+ //妫�鏌ヨ挋鐗堟槸鍚︽甯�
+ try
+ {
+ if (windowMask != null)
+ {
+ Debug.Log("windowMask:" + windowMask.transform.GetSiblingIndex() + " rectTransform:" + rectTransform.GetSiblingIndex() + " name:" + this.rectTransform.name);
+ if (windowMask.transform.GetSiblingIndex() >= rectTransform.GetSiblingIndex())
+ {
+ windowMask.transform.SetSiblingIndex(rectTransform.GetSiblingIndex());
+ }
+ }
+ }
+ catch (System.Exception ex)
+ {
+ OperationLogCollect.Instance.BugReportSys(ex.ToString());
+ Debug.LogError(ex.StackTrace);
+ }
+
try
{
WindowCenter.Instance.NotifyAfterOpen(this);
--
Gitblit v1.8.0