mirror of
https://github.com/4sval/FModel.git
synced 2026-06-22 16:00:17 -05:00
Generic search for wwise directory
This commit is contained in:
parent
48d172446e
commit
9318838ea7
|
|
@ -837,14 +837,26 @@ public class CUE4ParseViewModel : ViewModel
|
|||
return false;
|
||||
}
|
||||
case UAkAudioEvent when isNone && pointer.Object.Value is UAkAudioEvent { EventCookedData: { } wwiseData }:
|
||||
{
|
||||
{
|
||||
var files = Provider.Files.Values.ToList();
|
||||
|
||||
var bnkFile = files.FirstOrDefault(f => f.Path.Contains("/WwiseAudio/") && f.Path.EndsWith(".bnk", StringComparison.OrdinalIgnoreCase));
|
||||
string bnkDirectory = bnkFile != null ? Path.GetDirectoryName(bnkFile.Path.Replace('/', Path.DirectorySeparatorChar)) : null;
|
||||
|
||||
foreach (var kvp in wwiseData.EventLanguageMap)
|
||||
{
|
||||
if (!kvp.Value.HasValue)
|
||||
continue;
|
||||
|
||||
var projectName = string.IsNullOrEmpty(Provider.ProjectName) ? "Game" : Provider.ProjectName;
|
||||
var baseWwiseAudioPath = Path.Combine(projectName, "Content", "WwiseAudio", "Cooked");
|
||||
var baseWwiseAudioPath = Path.Combine(projectName, "Content", "WwiseAudio", "Cooked");
|
||||
|
||||
// If .bnk was found we will use that for base wwise directory
|
||||
if (!string.IsNullOrEmpty(bnkDirectory))
|
||||
{
|
||||
baseWwiseAudioPath = bnkDirectory;
|
||||
}
|
||||
|
||||
var audioEventPath = pointer.Object.Value.GetPathName().Replace("Game", projectName);
|
||||
|
||||
foreach (var soundBank in kvp.Value.Value.SoundBanks)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user