From e16af931f6624da01566311524aaf6956f54a3df Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 04 三月 2026 14:34:42 +0800
Subject: [PATCH] 466 h5版本 资源规则修改 打包修改(未完成 勿拉取)
---
Assets/Editor/Tool/PrefabCreateTool.cs | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Assets/Editor/Tool/PrefabCreateTool.cs b/Assets/Editor/Tool/PrefabCreateTool.cs
index fa50434..4b1431c 100644
--- a/Assets/Editor/Tool/PrefabCreateTool.cs
+++ b/Assets/Editor/Tool/PrefabCreateTool.cs
@@ -6,6 +6,7 @@
using UnityEditor;
using System.Collections;
using UnityEngine.UI;
+using Cysharp.Threading.Tasks;
public class PrefabCreateTool
@@ -73,9 +74,9 @@
}
[MenuItem("GameObject/UI/FunctionButton")]
- public static void CreateFunctionButton()
+ public static async UniTask CreateFunctionButton()
{
- var instance = UIUtility.CreateWidget("FunctionButtonPattern", "FunctionButton");
+ var instance = await UIUtility.CreateWidget("FunctionButtonPattern", "FunctionButton");
SetParent(instance);
}
@@ -115,9 +116,9 @@
}
[MenuItem("GameObject/UI/ItemCell")]
- public static void CreateItemCell()
+ public static async UniTask CreateItemCell()
{
- var button = UIUtility.CreateWidget("ItemCell", "ItemCell");
+ var button = await UIUtility.CreateWidget("ItemCell", "ItemCell");
SetParent(button);
}
@@ -168,9 +169,9 @@
}
[MenuItem("GameObject/UI/閫氱敤鎸夐挳")]
- public static void CreateButtonEx()
+ public static async UniTask CreateButtonEx()
{
- var button = UIUtility.CreateWidget("CommonButton", "CommonButton");
+ var button = await UIUtility.CreateWidget("CommonButton", "CommonButton");
var buttonEx = button.GetComponent<ButtonEx>();
buttonEx.interval = 0.1f;
buttonEx.pressedScale = 1.05f;
@@ -178,9 +179,9 @@
}
[MenuItem("GameObject/UI/绾㈢偣")]
- public static void CreateRedPoint()
+ public static async UniTask CreateRedPoint()
{
- var button = UIUtility.CreateWidget("RedPoint", "RedPoint");
+ var button = await UIUtility.CreateWidget("RedPoint", "RedPoint");
SetParent(button);
}
@@ -194,9 +195,9 @@
}
[MenuItem("GameObject/UI/浜岀骇甯﹀姛鑳芥")]
- public static void CreateSecondLevelWin()
+ public static async UniTask CreateSecondLevelWin()
{
- var prefab = UIUtility.CreateWidget("SecondLevelWin", "Panel");
+ var prefab = await UIUtility.CreateWidget("SecondLevelWin", "Panel");
SetParent(prefab);
var rectTransform = prefab.GetComponent<RectTransform>();
// 瀹屽叏濉厖鐖跺鍣�
--
Gitblit v1.8.0