From 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 26 三月 2026 17:46:11 +0800
Subject: [PATCH] webgl代码合并 1
---
Main/System/Battle/UIComp/MinggeBuffCell.cs | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/Main/System/Battle/UIComp/MinggeBuffCell.cs b/Main/System/Battle/UIComp/MinggeBuffCell.cs
index 56454ca..7bd6dd4 100644
--- a/Main/System/Battle/UIComp/MinggeBuffCell.cs
+++ b/Main/System/Battle/UIComp/MinggeBuffCell.cs
@@ -47,7 +47,7 @@
void Awake()
{
- LoadPrefab();
+ LoadPrefab().Forget();
}
GameObject cellContainer;
@@ -66,15 +66,20 @@
if (cellContainer == null)
{
- cellContainer = await UIUtility.CreateWidget("MinggeBuffCell", "Container_BuffCell");
+ var inst = await UIUtility.CreateWidget("MinggeBuffCell", "Container_BuffCell");
if (this == null)
{
- if (null != cellContainer)
- {
- DestroyImmediate(cellContainer);
- }
+ if (null != inst) DestroyImmediate(inst);
return;
}
+
+ if (cellContainer != null)
+ {
+ DestroyImmediate(inst);
+ return;
+ }
+ cellContainer = inst;
+
if (cellContainer != null)
{
cellContainer.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one);
--
Gitblit v1.8.0