AkGroupValue.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 "AkAudioType.h"
  17. #include "Wwise/CookedData/WwiseGroupValueCookedData.h"
  18. #include "Wwise/Loaded/WwiseLoadedGroupValue.h"
  19. #include "Wwise/Info/WwiseGroupValueInfo.h"
  20. #include "AkGroupValue.generated.h"
  21. UCLASS(Abstract)
  22. class AKAUDIO_API UAkGroupValue : public UAkAudioType
  23. {
  24. GENERATED_BODY()
  25. public:
  26. UPROPERTY(Transient, VisibleAnywhere, Category = "AkGroupValue")
  27. FWwiseGroupValueCookedData GroupValueCookedData;
  28. #if WITH_EDITORONLY_DATA
  29. UPROPERTY(EditAnywhere, Category = "AkGroupValue")
  30. FWwiseGroupValueInfo GroupValueInfo;
  31. #endif
  32. UPROPERTY(meta =(Deprecated, DeprecationMessage="Use Group ID from Load Data. Used for migration from older versions."))
  33. uint32 GroupShortID_DEPRECATED = 0;
  34. public:
  35. virtual void LoadData() override {LoadGroupValue();}
  36. virtual void UnloadData(bool bAsync = false) override {UnloadGroupValue(bAsync);}
  37. virtual AkUInt32 GetShortID() const override {return GroupValueCookedData.Id;}
  38. AkUInt32 GetGroupID() const {return GroupValueCookedData.GroupId;}
  39. #if WITH_EDITORONLY_DATA
  40. virtual FWwiseObjectInfo* GetInfoMutable() override {return &GroupValueInfo;}
  41. virtual FWwiseObjectInfo GetInfo() const override {return GroupValueInfo;}
  42. virtual void MigrateWwiseObjectInfo() override;
  43. virtual void ValidateShortID(FWwiseObjectInfo& WwiseInfo) const override;
  44. virtual bool SplitAssetName(FString& OutGroupName, FString& OutValueName) const;
  45. #endif
  46. protected :
  47. virtual void LoadGroupValue(){};
  48. void UnloadGroupValue(bool bAsync);
  49. FWwiseLoadedGroupValue LoadedGroupValue;
  50. };