Merge remote-tracking branch 'origin/master' into LouDi_Pig
This commit is contained in:
commit
1f23b17ce8
@ -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)
|
||||
|
||||
@ -38,8 +38,6 @@ namespace QFramework
|
||||
retNode.OnFinished = OnFinished;
|
||||
return retNode;
|
||||
}
|
||||
|
||||
|
||||
public ulong ActionID { get; set; }
|
||||
public ActionStatus Status { get; set; }
|
||||
|
||||
|
||||
@ -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; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user