feat: support asset bundle
This commit is contained in:
@@ -288,6 +288,17 @@ namespace OCES.Audio
|
||||
DontDestroyOnLoad(gameObject);
|
||||
|
||||
this.ResourceLoader = gameObject.AddComponent<ResourceLoader>();
|
||||
|
||||
if (AudioExtendSettings.Instance.useAssetBundle)
|
||||
{
|
||||
string bundlePath = Path.Combine(Application.streamingAssetsPath,
|
||||
AudioExtendSettings.Instance.audioBundlePath);
|
||||
this.ResourceLoader.SetProvider(new AssetBundleAssetProvider(bundlePath));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ResourceLoader.SetProvider(new ResourcesAssetProvider());
|
||||
}
|
||||
|
||||
string audioConfigPath = AudioExtendSettings.Instance.audioConfigPath;
|
||||
|
||||
@@ -388,8 +399,6 @@ namespace OCES.Audio
|
||||
AudioObject childContainer = this.m_audioObjects.GetMappingResult(switchContainer.Id, currentStateValue);
|
||||
return childContainer ?? this.m_audioObjects.GetDefaultSwitchOrFallback(switchContainer);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static class AudioConfigLoader
|
||||
|
||||
Reference in New Issue
Block a user