From 3f2cd27c5dfb3b450245bf1a37fc1b3414031c7c Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 11 二月 2026 11:03:58 +0800
Subject: [PATCH] 小游戏适配 资源系统改造
---
Main/System/Tip/ScrollTip.cs | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/Main/System/Tip/ScrollTip.cs b/Main/System/Tip/ScrollTip.cs
index dbb20af..f5103cd 100644
--- a/Main/System/Tip/ScrollTip.cs
+++ b/Main/System/Tip/ScrollTip.cs
@@ -1,6 +1,7 @@
锘縰sing System;
using System.Collections;
using System.Collections.Generic;
+using Cysharp.Threading.Tasks;
using UnityEngine;
public class ScrollTip
{
@@ -83,6 +84,21 @@
return tip;
}
+ public static async UniTask<ScrollTipDetail> RequestAsync()
+ {
+ ScrollTipDetail tip = null;
+ if (pool == null)
+ {
+ var _prefab = await UILoader.LoadPrefabAsync("Tip");
+ pool = GameObjectPoolManager.Instance.GetPool(_prefab);
+ }
+ if (pool != null)
+ {
+ tip = pool.Request().AddMissingComponent<ScrollTipDetail>();
+ }
+ return tip;
+ }
+
public static void Release(ScrollTipDetail tip, bool next = true)
{
if (m_ActiveTips.Contains(tip))
--
Gitblit v1.8.0