From 9f4c8e213a63d95482408dd18ba67d09b3b0319b Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 30 Dec 2024 20:07:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Actions/AnimationAction.cs | 2 -- Assets/Scripts/Actions/TimeTipAction.cs | 1 - 2 files changed, 3 deletions(-) diff --git a/Assets/Scripts/Actions/AnimationAction.cs b/Assets/Scripts/Actions/AnimationAction.cs index b7d4420d..f2cc26a3 100644 --- a/Assets/Scripts/Actions/AnimationAction.cs +++ b/Assets/Scripts/Actions/AnimationAction.cs @@ -38,8 +38,6 @@ namespace QFramework retNode.OnFinished = OnFinished; return retNode; } - - public ulong ActionID { get; set; } public ActionStatus Status { get; set; } diff --git a/Assets/Scripts/Actions/TimeTipAction.cs b/Assets/Scripts/Actions/TimeTipAction.cs index 2f985107..7bc4ff2c 100644 --- a/Assets/Scripts/Actions/TimeTipAction.cs +++ b/Assets/Scripts/Actions/TimeTipAction.cs @@ -4,7 +4,6 @@ using UnityEngine; using QFramework; using System; using QFramework.Example; -using static UnityEditor.Progress; public class TimeTipAction : IAction { public ulong ActionID { get; set; } From c3f7e8949e554c69c19db3a8f6045ca3ba742ee9 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 30 Dec 2024 20:55:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3webgl=E9=9F=B3=E9=A2=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResKit/Scripts/LocalAudioSupport.cs | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Assets/QFramework/Toolkits/ResKit/Scripts/LocalAudioSupport.cs b/Assets/QFramework/Toolkits/ResKit/Scripts/LocalAudioSupport.cs index bd027002..025d12cc 100644 --- a/Assets/QFramework/Toolkits/ResKit/Scripts/LocalAudioSupport.cs +++ b/Assets/QFramework/Toolkits/ResKit/Scripts/LocalAudioSupport.cs @@ -3,6 +3,7 @@ namespace QFramework using UnityEngine; using System.Collections; using UnityEngine.Networking; + using UnityEngine.Rendering; public static class LocalAudioResUtil { @@ -192,9 +193,30 @@ namespace QFramework } else { - // Convert the downloaded data to an AudioClip + // ȴ + while (!request.downloadHandler.isDone) + { + yield return null; + } + + + // ɺתΪ AudioClip AudioClip clip = DownloadHandlerAudioClip.GetContent(request); - mAsset = clip; + + if (clip != null) + { + // Ƶ״̬ + while (clip.loadState != AudioDataLoadState.Loaded) + { + yield return null; + } + + mAsset = clip; // Ƶɺֵ mAsset + } + else + { + Debug.LogError("Failed to load audio clip."); + } } if (RefCount <= 0)