WwiseGroupValueInfoLibrary.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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 "Kismet/BlueprintFunctionLibrary.h"
  17. #include "Wwise/Info/WwiseGroupValueInfo.h"
  18. #include "WwiseGroupValueInfoLibrary.generated.h"
  19. UCLASS()
  20. class WWISERESOURCELOADER_API UWwiseGroupValueInfoLibrary: public UBlueprintFunctionLibrary
  21. {
  22. GENERATED_BODY()
  23. public:
  24. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValueInfo", Meta = (BlueprintThreadSafe, DisplayName = "Make GroupValueInfo"))
  25. static
  26. UPARAM(DisplayName="GroupValue Info") FWwiseGroupValueInfo
  27. MakeStruct(
  28. const FGuid& AssetGuid,
  29. int32 GroupShortId,
  30. int32 WwiseShortId,
  31. const FString& WwiseName)
  32. {
  33. return FWwiseGroupValueInfo(AssetGuid, (uint32)GroupShortId, (uint32)WwiseShortId, FName(WwiseName));
  34. }
  35. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValueInfo", Meta = (BlueprintThreadSafe, DisplayName = "Break GroupValueInfo"))
  36. static void
  37. BreakStruct(
  38. UPARAM(DisplayName="GroupValue Info") FWwiseGroupValueInfo Ref,
  39. FGuid& OutAssetGuid,
  40. int32& OutGroupShortId,
  41. int32& OutWwiseShortId,
  42. FString& OutWwiseName)
  43. {
  44. OutAssetGuid = Ref.WwiseGuid;
  45. OutGroupShortId = (int32)Ref.GroupShortId;
  46. OutWwiseShortId = (int32)Ref.WwiseShortId;
  47. OutWwiseName = Ref.WwiseName.ToString();
  48. }
  49. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValue Info", Meta = (BlueprintThreadSafe))
  50. static
  51. UPARAM(DisplayName="GUID") FGuid
  52. GetAssetGuid(
  53. UPARAM(DisplayName="GroupValue Info") const FWwiseGroupValueInfo& Ref)
  54. {
  55. return Ref.WwiseGuid;
  56. }
  57. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValue Info", Meta = (BlueprintThreadSafe))
  58. static
  59. UPARAM(DisplayName="Group Short Id") int32
  60. GetGroupShortId(
  61. UPARAM(DisplayName="GroupValue Info") const FWwiseGroupValueInfo& Ref)
  62. {
  63. return (int32)Ref.GroupShortId;
  64. }
  65. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValue Info", Meta = (BlueprintThreadSafe))
  66. static
  67. UPARAM(DisplayName="Short Id") int32
  68. GetWwiseShortId(
  69. UPARAM(DisplayName="GroupValue Info") const FWwiseGroupValueInfo& Ref)
  70. {
  71. return (int32)Ref.WwiseShortId;
  72. }
  73. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValue Info", Meta = (BlueprintThreadSafe))
  74. static
  75. UPARAM(DisplayName="Name") FString
  76. GetWwiseName(
  77. UPARAM(DisplayName="GroupValue Info") const FWwiseGroupValueInfo& Ref)
  78. {
  79. return Ref.WwiseName.ToString();
  80. }
  81. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValue Info", Meta = (BlueprintThreadSafe))
  82. static
  83. UPARAM(DisplayName="Struct Out") FWwiseGroupValueInfo
  84. SetAssetGuid(
  85. UPARAM(DisplayName="GroupValue Info") const FWwiseGroupValueInfo& Ref,
  86. const FGuid& AssetGuid)
  87. {
  88. auto Result = Ref;
  89. Result.WwiseGuid = AssetGuid;
  90. return Result;
  91. }
  92. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValue Info", Meta = (BlueprintThreadSafe))
  93. static
  94. UPARAM(DisplayName="Struct Out") FWwiseGroupValueInfo
  95. SetGroupShortId(
  96. UPARAM(DisplayName="GroupValue Info") const FWwiseGroupValueInfo& Ref,
  97. int32 GroupShortId)
  98. {
  99. auto Result = Ref;
  100. Result.GroupShortId = (uint32)GroupShortId;
  101. return Result;
  102. }
  103. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValue Info", Meta = (BlueprintThreadSafe))
  104. static
  105. UPARAM(DisplayName="Struct Out") FWwiseGroupValueInfo
  106. SetWwiseShortId(
  107. UPARAM(DisplayName="GroupValue Info") const FWwiseGroupValueInfo& Ref,
  108. int32 WwiseShortId)
  109. {
  110. auto Result = Ref;
  111. Result.WwiseShortId = WwiseShortId;
  112. return Result;
  113. }
  114. UFUNCTION(BlueprintPure, Category = "Wwise|GroupValue Info", Meta = (BlueprintThreadSafe))
  115. static
  116. UPARAM(DisplayName="Struct Out") FWwiseGroupValueInfo
  117. SetWwiseName(
  118. UPARAM(DisplayName="GroupValue Info") const FWwiseGroupValueInfo& Ref,
  119. const FString& WwiseName)
  120. {
  121. auto Result = Ref;
  122. Result.WwiseName = FName(WwiseName);
  123. return Result;
  124. }
  125. };