newly updated FMODStudio plugin for UE5.3 migration
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user