From 74e1bdc1d4eb03c282046c72d27aba0abb36ba68 Mon Sep 17 00:00:00 2001
From: HungDK <>
Date: Thu, 21 May 2026 17:40:58 +0700
Subject: [PATCH] Add bring ui to front function
---
.../PerfectWorld/Scripts/UI/EC_UIUtility.cs | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Assets/PerfectWorld/Scripts/UI/EC_UIUtility.cs b/Assets/PerfectWorld/Scripts/UI/EC_UIUtility.cs
index 3015327276..0f6ceddf9d 100644
--- a/Assets/PerfectWorld/Scripts/UI/EC_UIUtility.cs
+++ b/Assets/PerfectWorld/Scripts/UI/EC_UIUtility.cs
@@ -125,6 +125,8 @@ namespace BrewMonster.Scripts.UI
///
/// The GameObject panel to show/hide
/// True to show, false to hide
+ public const int OverlayPanelSortOrder = 2000;
+
public static void ShowPanel(GameObject panel, bool show)
{
if (panel == null)
@@ -145,6 +147,25 @@ namespace BrewMonster.Scripts.UI
}
}
+ /// Draw panel above other UI dialogs (sibling order + canvas sort).
+ public static void BringPanelToFront(GameObject panel)
+ {
+ if (panel == null)
+ return;
+
+ panel.transform.SetAsLastSibling();
+
+ var canvas = panel.GetComponent