WwiseReconcileCommandlet.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 "CoreMinimal.h"
  17. #include "AkAudioEvent.h"
  18. #include "WwiseReconcile.h"
  19. #include "Commandlets/Commandlet.h"
  20. #include "Wwise/Metadata/WwiseMetadataBasicReference.h"
  21. #include "WwiseReconcileCommandlet.generated.h"
  22. class UAkAssetFactory;
  23. class FWwiseProjectDatabase;
  24. class FAssetRegistryModule;
  25. class FAssetToolsModule;
  26. UCLASS()
  27. class WWISERECONCILE_API UWwiseReconcileCommandlet : public UCommandlet
  28. {
  29. GENERATED_BODY()
  30. public:
  31. virtual int32 Main(const FString& Params) override;
  32. UWwiseReconcileCommandlet();
  33. private:
  34. /** All commandline Tokens */
  35. TArray<FString> CmdTokens;
  36. /** All commandline switches */
  37. TArray<FString> CmdSwitches;
  38. FWwiseProjectDatabase* ProjectDatabase;
  39. FAssetRegistryModule* AssetRegistryModule;
  40. FAssetToolsModule* AssetToolsModule;
  41. // Array of all existing UAkAudioType uassets
  42. TArray<FAssetData> Assets;
  43. // Map from Wwise GUIDs to existing UAkAudioType uassets
  44. TMap<FGuid,FAssetData> GuidAssetMap;
  45. // Existing assets without a GUID
  46. TArray<FAssetData> InvalidAssets;
  47. // Map of existing objects in the Wwise Project Database
  48. TMap<FGuid, FWwiseMetadataBasicReference> GuidWwiseMetadataMap;
  49. TArray<FAssetData> AssetsToDelete;
  50. TArray<FWwiseNewAsset> AssetsToCreate;
  51. TArray<FAssetData> AssetsToUpdate;
  52. TArray<FAssetData> AssetsToRename;
  53. /** Prints command line arguments */
  54. void PrintHelp();
  55. void GetAllAssets();
  56. void GetAssetChanges(EWwiseReconcileOperationFlags OperationFlags = EWwiseReconcileOperationFlags::All);
  57. TArray<FAssetData> CreateAssets();
  58. TArray<FAssetData> UpdateExistingAssets();
  59. bool ReconcileAssets();
  60. int32 DeleteAssets();
  61. UClass* GetUClassFromWwiseRefType(EWwiseRefType RefType);
  62. };