AkAssetMigrationManager.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. #pragma once
  16. #include "AkAssetMigrationHelper.h"
  17. #include "AkSettings.h"
  18. #include "WwiseUnrealDefines.h"
  19. #include "LevelEditor.h"
  20. class AkAssetMigrationManager
  21. {
  22. public:
  23. struct MigrationResult
  24. {
  25. bool bSuccess = true;
  26. bool bBankTransferSucceeded = true;
  27. bool bProjectMigrationSucceeded = true;
  28. bool bAssetMigrationSucceeded = true;
  29. bool bAssetCleanupSucceeded = true;
  30. TArray<FString> ErrorReport;
  31. };
  32. void Init();
  33. void Uninit();
  34. void EditorTryMigration();
  35. MigrationResult PerformMigration(AkAssetMigration::FMigrationOperations MigrationOperations);
  36. bool IsProjectMigrated();
  37. bool IsMigrationRequired(AkAssetMigration::FMigrationContext& MigrationOptions);
  38. void CreateMigrationMenuOption();
  39. void RemoveMigrationMenuOption();
  40. static void ClearSoundBanksForMigration();
  41. static bool MigrateProjectSettings(const bool bWasUsingEBP, const bool bUseGeneratedSubFolders, const FString& GeneratedSoundBanksFolder);
  42. static bool SetStandardProjectSettings();
  43. static bool SetGeneratedSoundBanksPath(const FString& ProjectContent, const FString& GeneratedSoundBanksFolder);
  44. static bool IsSoundDataPathInDirectoriesToAlwaysStage(const FString& SoundDataPath);
  45. private:
  46. #if !UE_5_0_OR_LATER
  47. FLevelEditorModule::FLevelEditorMenuExtender LevelViewportToolbarBuildMenuExtenderAkMigration;
  48. FDelegateHandle LevelViewportToolbarBuildMenuExtenderAkMigrationHandle;
  49. #endif
  50. FName MigrationMenuSectionName = "AkMigration";
  51. };