Wwise Audio Integration

This commit is contained in:
Reinier Vens 2021-04-30 06:39:57 +01:00
commit 7d67d7ec2c
72 changed files with 4551 additions and 11819 deletions

View file

@ -11,6 +11,7 @@ using Cinemachine;
using Ink;
using Ink.Runtime;
using MessagePack;
using Newtonsoft.Json;
using TMPro;
using UniRx;
using UnityEngine;
@ -36,6 +37,21 @@ public class ActionGameManager : MonoBehaviour
get => _gameDataDirectory ??= new DirectoryInfo(Application.dataPath).Parent.CreateSubdirectory("GameData");
}
private static WwiseMetaSoundBanksInfo _soundBanksInfo;
public static WwiseMetaSoundBanksInfo SoundBanksInfo => _soundBanksInfo ??=
JsonConvert.DeserializeObject<WwiseMetadataFile>(File.ReadAllText(Path.Combine(GameDataDirectory.FullName, "SoundbanksInfo.json")))
.SoundBanksInfo;
private static HashSet<uint> _loadedSoundBanks = new HashSet<uint>();
public static void LoadSoundbank(uint soundBank)
{
if (!_loadedSoundBanks.Contains(soundBank))
{
AkSoundEngine.LoadBank(SoundBanksInfo.GetSoundBank(soundBank).ShortName, out _);
_loadedSoundBanks.Add(soundBank);
}
}
private static CultCache _cultCache;
public static CultCache CultCache