newly updated FMODStudio plugin for UE5.3 migration

This commit is contained in:
Ji Yoon Rhee
2025-02-02 00:35:31 +09:00
parent 6ec77258e3
commit 547689631f
296 changed files with 4467 additions and 4042 deletions

View File

@ -36,11 +36,21 @@ int32 UFMODGenerateAssetsCommandlet::Main(const FString& CommandLine)
// Rebuild switch
if (Switches.Contains(RebuildSwitch))
{
FString FolderToDelete;
IPlatformFile& FileManager = FPlatformFileManager::Get().GetPlatformFile();
/*
Combine the ProjectContentDir + ContentBrowserPrefix to make a filesystem path
to where the FMOD generated assets directories live e.g.
../../../../UnrealProjects/MyProject/Content/FMOD
Should work for non-default values of ContentBrowserPrefix e.g. /Game/foo/bar/baz/
*/
FString folderPath = Settings.ContentBrowserPrefix.TrimChar('/'); // /Game/FMOD/ -> Game/FMOD
folderPath.Split(TEXT("/"), 0, &folderPath); // Game/FMOD -> FMOD
folderPath = FPaths::ProjectContentDir() + folderPath + "/"; // FMOD -> ../../../../UnrealProjects/MyProject/Content/FMOD/
for (FString folder : Settings.GeneratedFolders)
{
FolderToDelete = FPaths::ProjectContentDir() + Settings.ContentBrowserPrefix + folder;
FString FolderToDelete = folderPath + folder;
bool removed = FileManager.DeleteDirectoryRecursively(*FolderToDelete);
if (!removed)
{