feat: 在Unity内支持直接调整音频文件进行混音
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user