feat: 在Unity内支持直接调整音频文件进行混音

This commit is contained in:
2026-05-19 12:04:31 +08:00
parent 67de857f8c
commit 9dc4228b5c
4 changed files with 77 additions and 12 deletions
@@ -21,10 +21,13 @@ namespace OCES
[CanBeNull]
internal T LoadSync<T>(string path) where T : Object
{
#if !AUDIO_MIXING
if (this.m_cachedObjects.TryGetValue(path, out Object cachedObject))
{
return cachedObject as T;
}
#endif
T newObject;
if (this.m_assetProvider is not null)
@@ -36,8 +39,10 @@ namespace OCES
newObject = Resources.Load<T>(path);
Debug.LogWarning($"[ResourceLoader] No IAssetProvider set, falling back to Resources.Load for '{path}'");
}
#if !AUDIO_MIXING
this.m_cachedObjects.Add(path, newObject);
#endif
return newObject;
}