WwiseSimpleExtSrcModule.cpp 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #include "Wwise/WwiseSimpleExtSrcModule.h"
  16. #include "Wwise/SimpleExtSrc/WwiseSimpleExtSrcManager.h"
  17. #include "Wwise/Stats/SimpleExtSrc.h"
  18. #include "Modules/ModuleManager.h"
  19. #if WITH_EDITOR
  20. #include "Wwise/SimpleExtSrc/WwiseExternalSourceSettings.h"
  21. #include "ISettingsModule.h"
  22. #endif
  23. #define LOCTEXT_NAMESPACE "SimpleExternalSourceModule"
  24. IMPLEMENT_MODULE(FWwiseSimpleExtSrcModule, WwiseSimpleExternalSource)
  25. IWwiseExternalSourceManager* FWwiseSimpleExtSrcModule::InstantiateExternalSourceManager()
  26. {
  27. return new FWwiseSimpleExtSrcManager;
  28. }
  29. void FWwiseSimpleExtSrcModule::StartupModule()
  30. {
  31. FWwiseFileHandlerModule::StartupModule();
  32. #if WITH_EDITOR
  33. if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
  34. {
  35. SettingsModule->RegisterSettings("Project", "Wwise", "Wwise External Sources",
  36. LOCTEXT("RuntimeSettingsName", "Wwise Simple External Source Settings"), LOCTEXT("RuntimeSettingsDescription", "Set the external source data tables and staging directory"),
  37. GetMutableDefault<UWwiseExternalSourceSettings>());
  38. }
  39. #endif
  40. }
  41. void FWwiseSimpleExtSrcModule::ShutdownModule()
  42. {
  43. FWwiseFileHandlerModule::ShutdownModule();
  44. // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
  45. // we call this function before unloading the module.
  46. #if WITH_EDITOR
  47. if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
  48. {
  49. SettingsModule->UnregisterSettings("Project", "Wwise", "Wwise External Sources");
  50. }
  51. #endif
  52. }
  53. #undef LOCTEXT_NAMESPACE