AkEffectShareSet.h 2.4 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/WwiseLocalizedShareSetCookedData.h"
  18. #include "Wwise/Loaded/WwiseLoadedShareSet.h"
  19. #if WITH_EDITORONLY_DATA
  20. #include "Wwise/Info/WwiseObjectInfo.h"
  21. #endif
  22. #include "AkEffectShareSet.generated.h"
  23. UCLASS(BlueprintType)
  24. class AKAUDIO_API UAkEffectShareSet : public UAkAudioType
  25. {
  26. GENERATED_BODY()
  27. public:
  28. UPROPERTY(Transient, VisibleAnywhere, Category = "AkEffectShareSet")
  29. FWwiseLocalizedShareSetCookedData ShareSetCookedData;
  30. #if WITH_EDITORONLY_DATA
  31. UPROPERTY(EditAnywhere, Category = "AkEffectShareSet")
  32. FWwiseObjectInfo ShareSetInfo;
  33. #endif
  34. public:
  35. void Serialize(FArchive& Ar) override;
  36. virtual void LoadData() override {LoadEffectShareSet();}
  37. virtual void UnloadData(bool bAsync = false) override {UnloadEffectShareSet(bAsync);}
  38. virtual AkUInt32 GetShortID() const override {return ShareSetCookedData.ShareSetId;}
  39. #if WITH_EDITORONLY_DATA
  40. virtual FWwiseObjectInfo* GetInfoMutable() override {return &ShareSetInfo;};
  41. virtual FWwiseObjectInfo GetInfo() const override{return ShareSetInfo;}
  42. virtual bool ObjectIsInSoundBanks() override;
  43. void CookAdditionalFilesOverride(const TCHAR* PackageFilename, const ITargetPlatform* TargetPlatform,
  44. TFunctionRef<void(const TCHAR* Filename, void* Data, int64 Size)> WriteAdditionalFile) override;
  45. virtual void FillInfo() override;
  46. #endif
  47. private :
  48. void LoadEffectShareSet();
  49. void UnloadEffectShareSet(bool bAsync);
  50. FWwiseLoadedShareSetPtrAtomic LoadedShareSet{nullptr};
  51. };