AkSettingsPerUser.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 "Engine/EngineTypes.h"
  17. #include "AkWaapiClient.h"
  18. #include "AkSettingsPerUser.generated.h"
  19. DECLARE_EVENT(UAkSettingsPerUser, ShowRoomsPortalsChanged);
  20. DECLARE_EVENT(UAkSettingsPerUser, ShowReverbInfoChanged)
  21. DECLARE_EVENT(UAkSettingsPerUser, AutoConnectChanged);
  22. DECLARE_EVENT(UAkSettingsPerUser, AutoSyncWaapiNamesChanged);
  23. DECLARE_MULTICAST_DELEGATE(FOnSoundBanksPathChangedDelegate);
  24. UCLASS(config = EditorPerProjectUserSettings)
  25. class AKAUDIO_API UAkSettingsPerUser : public UObject
  26. {
  27. GENERATED_BODY()
  28. public:
  29. UAkSettingsPerUser(const FObjectInitializer& ObjectInitializer);
  30. // Wwise Installation Path (Root folder containing the Authoring, SDK, etc folders)
  31. UPROPERTY(Config, EditAnywhere, Category = "Installation")
  32. FDirectoryPath WwiseWindowsInstallationPath;
  33. // Wwise Installation Path (Root folder containing the Authoring, SDK, etc folders)
  34. UPROPERTY(Config, EditAnywhere, Category = "Installation", meta = (FilePathFilter = "app", AbsolutePath))
  35. FFilePath WwiseMacInstallationPath;
  36. //Override the Root Output Path in the project settings
  37. UPROPERTY(Config, EditAnywhere, Category = "Installation")
  38. FDirectoryPath RootOutputPathOverride;
  39. UPROPERTY(Config)
  40. FDirectoryPath GeneratedSoundBanksFolderOverride_DEPRECATED;
  41. // IP Address used to connect to WAAPI. Changing this requires Editor restart
  42. UPROPERTY(Config, EditAnywhere, Category = "WAAPI")
  43. FString WaapiIPAddress = WAAPI_LOCAL_HOST_IP_STRING;
  44. // Network Port used to connect to WAAPI. Changing this requires Editor restart
  45. UPROPERTY(Config, EditAnywhere, Category = "WAAPI")
  46. uint32 WaapiPort = WAAPI_PORT;
  47. // Whether to connect to WAAPI or not
  48. UPROPERTY(Config, EditAnywhere, Category = "WAAPI")
  49. bool bAutoConnectToWAAPI = false;
  50. // Whether to synchronize the selection between the WAAPI picker and the Wwise Project Explorer
  51. UPROPERTY(Config, EditAnywhere, Category = "WAAPI")
  52. bool AutoSyncSelection = true;
  53. // Time out value for the waapi error message translator to translate an error message (in ms). If set to 0, disable the translator entirely
  54. UPROPERTY(Config, EditAnywhere, Category = "Error Message Translator")
  55. uint32 WaapiTranslatorTimeout = 0;
  56. UPROPERTY(Config)
  57. bool SuppressGeneratedSoundBanksPathWarnings = false;
  58. UPROPERTY(Config)
  59. bool SoundDataGenerationSkipLanguage = false;
  60. //Opens a notification that the user must accept before reloading Wwise Asset Data
  61. UPROPERTY(Config, EditAnywhere, Category = "Asset Reload")
  62. bool AskForWwiseAssetReload = false;
  63. #if WITH_EDITORONLY_DATA
  64. // Visualize rooms and portals in the viewport. This requires 'realtime' to be enabled in the viewport.
  65. UPROPERTY(Config, EditAnywhere, Category = "Viewports")
  66. bool VisualizeRoomsAndPortals = false;
  67. // Flips the state of VisualizeRoomsAndPortals. Used for the viewport menu options. (See FAudiokineticToolsModule in AudiokineticToolsModule.cpp).
  68. void ToggleVisualizeRoomsAndPortals();
  69. // When enabled, information about AkReverbComponents will be displayed in viewports, above the component's UPrimitiveComponent parent. This requires 'realtime' to be enabled in the viewport.
  70. UPROPERTY(Config, EditAnywhere, Category = "Viewports")
  71. bool bShowReverbInfo = true;
  72. // Flips the state of bShowReverbInfo. Used for the viewport menu options. (See FAudiokineticToolsModule in AudiokineticToolsModule.cpp).
  73. void ToggleShowReverbInfo();
  74. ShowRoomsPortalsChanged OnShowRoomsPortalsChanged;
  75. ShowReverbInfoChanged OnShowReverbInfoChanged;
  76. #endif
  77. #if WITH_EDITOR
  78. public:
  79. mutable AutoConnectChanged OnAutoConnectToWaapiChanged;
  80. FOnSoundBanksPathChangedDelegate OnGeneratedSoundBanksPathChanged;
  81. protected:
  82. void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override;
  83. void PreEditChange(FProperty* PropertyAboutToChange) override;
  84. private:
  85. FString PreviousWwiseWindowsInstallationPath;
  86. FString PreviousWwiseMacInstallationPath;
  87. FString PreviousGeneratedSoundBanksFolder;
  88. #endif
  89. };