2023-03-07 17:01:52 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
# pragma once
# include "Containers/Map.h"
2023-06-16 17:48:20 -04:00
# include "Delegates/IDelegateInstance.h"
2023-03-07 17:01:52 -05:00
# include "Engine/Engine.h"
# include "Interfaces/MetasoundOutputFormatInterfaces.h"
2024-05-08 14:53:53 -04:00
# include "MetasoundBuilderBase.h"
2023-06-16 17:48:20 -04:00
# include "MetasoundDocumentInterface.h"
# include "MetasoundDynamicOperatorTransactor.h"
2023-03-07 17:01:52 -05:00
# include "MetasoundFrontendController.h"
# include "MetasoundFrontendDocument.h"
# include "MetasoundFrontendDocumentBuilder.h"
2023-06-16 17:48:20 -04:00
# include "MetasoundFrontendDocumentCacheInterface.h"
# include "MetasoundFrontendDocumentModifyDelegates.h"
2023-03-07 17:01:52 -05:00
# include "Subsystems/EngineSubsystem.h"
2023-06-16 17:48:20 -04:00
# include "Templates/Function.h"
2023-03-07 17:01:52 -05:00
# include "UObject/NoExportTypes.h"
# include "UObject/Object.h"
# include "UObject/ObjectMacros.h"
# include "MetasoundBuilderSubsystem.generated.h"
// Forward Declarations
2023-11-08 16:53:27 -05:00
class FMetasoundAssetBase ;
2023-03-07 17:01:52 -05:00
class UAudioComponent ;
2023-05-10 20:28:39 -04:00
class UMetaSound ;
class UMetaSoundPatch ;
class UMetaSoundSource ;
2023-07-24 17:38:26 -04:00
struct FMetasoundFrontendClassName ;
2023-05-10 20:28:39 -04:00
struct FMetasoundFrontendVersion ;
2023-11-08 16:53:27 -05:00
struct FPerPlatformFloat ;
struct FPerPlatformInt ;
2023-05-10 20:28:39 -04:00
2023-03-07 17:01:52 -05:00
enum class EMetaSoundOutputAudioFormat : uint8 ;
namespace Metasound : : Engine
{
2024-05-08 14:53:53 -04:00
// Forward Declarations
2023-03-07 17:01:52 -05:00
struct FOutputAudioFormatInfo ;
2024-05-08 14:53:53 -04:00
class FMetaSoundAssetManager ;
2023-03-07 17:01:52 -05:00
} // namespace Metasound::Engine
DECLARE_DYNAMIC_DELEGATE_OneParam ( FOnCreateAuditionGeneratorHandleDelegate , UMetasoundGeneratorHandle * , GeneratorHandle ) ;
2023-05-30 14:39:48 -04:00
/** Builder in charge of building a MetaSound Patch */
2024-09-11 20:41:41 -04:00
UCLASS ( Transient , BlueprintType , meta = ( DisplayName = " MetaSound Patch Builder " ) )
2023-03-07 17:01:52 -05:00
class METASOUNDENGINE_API UMetaSoundPatchBuilder : public UMetaSoundBuilderBase
{
GENERATED_BODY ( )
public :
2024-10-01 19:02:59 -04:00
virtual TScriptInterface < IMetaSoundDocumentInterface > BuildNewMetaSound ( FName NameBase ) const override ;
2024-05-08 14:53:53 -04:00
virtual const UClass & GetBaseMetaSoundUClass ( ) const override ;
2023-09-13 20:11:49 -04:00
protected :
2024-10-01 19:51:34 -04:00
virtual void BuildAndOverwriteMetaSoundInternal ( TScriptInterface < IMetaSoundDocumentInterface > ExistingMetaSound , bool bForceUniqueClassName ) const override ;
2024-05-08 14:53:53 -04:00
virtual void OnAssetReferenceAdded ( TScriptInterface < IMetaSoundDocumentInterface > DocInterface ) override ;
virtual void OnRemovingAssetReference ( TScriptInterface < IMetaSoundDocumentInterface > DocInterface ) override ;
2023-09-13 20:11:49 -04:00
friend class UMetaSoundBuilderSubsystem ;
2023-03-07 17:01:52 -05:00
} ;
/** Builder in charge of building a MetaSound Source */
2024-09-11 20:41:41 -04:00
UCLASS ( Transient , BlueprintType , meta = ( DisplayName = " MetaSound Source Builder " ) )
2023-03-07 17:01:52 -05:00
class METASOUNDENGINE_API UMetaSoundSourceBuilder : public UMetaSoundBuilderBase
{
GENERATED_BODY ( )
public :
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( WorldContext = " Parent " , AdvancedDisplay = " 2 " ) )
2023-06-16 17:48:20 -04:00
void Audition ( UObject * Parent , UAudioComponent * AudioComponent , FOnCreateAuditionGeneratorHandleDelegate OnCreateGenerator , bool bLiveUpdatesEnabled = false ) ;
2023-03-07 17:01:52 -05:00
2023-06-16 17:48:20 -04:00
// Returns whether or not live updates are both globally enabled (via cvar) and are enabled on this builder's last built sound, which may or may not still be playing.
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
bool GetLiveUpdatesEnabled ( ) const ;
2023-11-08 16:53:27 -05:00
// Sets the MetaSound's BlockRate override
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
void SetBlockRateOverride ( float BlockRate ) ;
2023-03-07 17:01:52 -05:00
// Sets the output audio format of the source
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( ExpandEnumAsExecs = " OutResult " ) )
void SetFormat ( EMetaSoundOutputAudioFormat OutputFormat , EMetaSoundBuilderResult & OutResult ) ;
2023-11-08 16:53:27 -05:00
// Sets the MetaSound's SampleRate override
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
void SetSampleRateOverride ( int32 SampleRate ) ;
2023-03-07 17:01:52 -05:00
const Metasound : : Engine : : FOutputAudioFormatInfoPair * FindOutputAudioFormatInfo ( ) const ;
2024-10-01 19:02:59 -04:00
virtual TScriptInterface < IMetaSoundDocumentInterface > BuildNewMetaSound ( FName NameBase ) const override ;
2024-05-08 14:53:53 -04:00
virtual const UClass & GetBaseMetaSoundUClass ( ) const override ;
2023-09-13 20:11:49 -04:00
2023-11-08 16:53:27 -05:00
# if WITH_EDITORONLY_DATA
// Sets the MetaSound's BlockRate override (editor only, to allow setting per-platform values)
void SetPlatformBlockRateOverride ( const FPerPlatformFloat & PlatformFloat ) ;
// Sets the MetaSound's BlockRate override (editor only, to allow setting per-platform values)
void SetPlatformSampleRateOverride ( const FPerPlatformInt & PlatformInt ) ;
# endif // WITH_EDITORONLY_DATA
// Sets the MetaSound's Quality level
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
void SetQuality ( FName Quality ) ;
2023-09-13 20:11:49 -04:00
protected :
2024-10-01 19:51:34 -04:00
virtual void BuildAndOverwriteMetaSoundInternal ( TScriptInterface < IMetaSoundDocumentInterface > ExistingMetaSound , bool bForceUniqueClassName ) const override ;
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
virtual void InitDelegates ( Metasound : : Frontend : : FDocumentModifyDelegates & OutDocumentDelegates ) override ;
2024-05-08 14:53:53 -04:00
virtual void OnAssetReferenceAdded ( TScriptInterface < IMetaSoundDocumentInterface > DocInterface ) override ;
virtual void OnRemovingAssetReference ( TScriptInterface < IMetaSoundDocumentInterface > DocInterface ) override ;
2023-09-13 20:11:49 -04:00
2023-03-07 17:01:52 -05:00
private :
2023-08-16 18:37:56 -04:00
static TOptional < Metasound : : FAnyDataReference > CreateDataReference ( const Metasound : : FOperatorSettings & InOperatorSettings , FName DataType , const Metasound : : FLiteral & InLiteral , Metasound : : EDataReferenceAccessType AccessType ) ;
2023-06-16 17:48:20 -04:00
2024-08-23 21:59:54 -04:00
const FMetasoundFrontendGraph & GetConstTargetPageGraphChecked ( ) const ;
2023-09-13 20:11:49 -04:00
const UMetaSoundSource & GetMetaSoundSource ( ) const ;
UMetaSoundSource & GetMetaSoundSource ( ) ;
2024-06-27 23:26:57 -04:00
void InitTargetPageDelegates ( Metasound : : Frontend : : FDocumentModifyDelegates & OutDocumentDelegates ) ;
2023-09-13 20:11:49 -04:00
2023-06-16 17:48:20 -04:00
void OnEdgeAdded ( int32 EdgeIndex ) const ;
2023-12-01 12:57:59 -05:00
void OnInputAdded ( int32 InputIndex ) ;
void OnLiveComponentFinished ( UAudioComponent * AudioComponent ) ;
2023-06-16 17:48:20 -04:00
void OnNodeAdded ( int32 NodeIndex ) const ;
void OnNodeInputLiteralSet ( int32 NodeIndex , int32 VertexIndex , int32 LiteralIndex ) const ;
void OnOutputAdded ( int32 OutputIndex ) const ;
2024-06-18 16:47:21 -04:00
void OnPageAdded ( const Metasound : : Frontend : : FDocumentMutatePageArgs & InArgs ) ;
2023-08-07 13:38:36 -04:00
void OnRemoveSwappingEdge ( int32 SwapIndex , int32 LastIndex ) const ;
2023-12-01 12:57:59 -05:00
void OnRemovingInput ( int32 InputIndex ) ;
2023-08-07 13:38:36 -04:00
void OnRemoveSwappingNode ( int32 SwapIndex , int32 LastIndex ) const ;
2023-06-16 17:48:20 -04:00
void OnRemovingNodeInputLiteral ( int32 NodeIndex , int32 VertexIndex , int32 LiteralIndex ) const ;
void OnRemovingOutput ( int32 OutputIndex ) const ;
2024-06-18 16:47:21 -04:00
void OnRemovingPage ( const Metasound : : Frontend : : FDocumentMutatePageArgs & InArgs ) ;
2023-06-16 17:48:20 -04:00
using FAuditionableTransaction = TFunctionRef < bool ( Metasound : : DynamicGraph : : FDynamicOperatorTransactor & ) > ;
bool ExecuteAuditionableTransaction ( FAuditionableTransaction Transaction ) const ;
2023-12-01 12:57:59 -05:00
TArray < uint64 > LiveComponentIDs ;
FDelegateHandle LiveComponentHandle ;
2024-08-23 21:59:54 -04:00
FGuid TargetPageID = Metasound : : Frontend : : DefaultPageID ;
2023-12-01 12:57:59 -05:00
2023-06-16 17:48:20 -04:00
friend class UMetaSoundBuilderSubsystem ;
2023-03-07 17:01:52 -05:00
} ;
/** The subsystem in charge of tracking MetaSound builders */
2024-09-11 20:41:41 -04:00
UCLASS ( meta = ( DisplayName = " MetaSound Builder Subsystem " ) )
2024-05-08 14:53:53 -04:00
class METASOUNDENGINE_API UMetaSoundBuilderSubsystem : public UEngineSubsystem
2023-03-07 17:01:52 -05:00
{
GENERATED_BODY ( )
2023-06-22 14:51:42 -04:00
private :
2023-03-07 17:01:52 -05:00
UPROPERTY ( )
2023-06-22 14:51:42 -04:00
TMap < FName , TObjectPtr < UMetaSoundBuilderBase > > NamedBuilders ;
2023-06-16 17:48:20 -04:00
2024-05-08 14:53:53 -04:00
public :
2024-05-29 15:33:29 -04:00
UE_DEPRECATED ( 5.5 , " Call 'ReloadBuilder' in IDocumentBuilderRegistry instead " )
2024-05-08 14:53:53 -04:00
virtual void InvalidateDocumentCache ( const FMetasoundFrontendClassName & InClassName ) const ;
2023-06-16 17:48:20 -04:00
2023-09-18 14:32:59 -04:00
static UMetaSoundBuilderSubsystem * Get ( ) ;
2023-05-10 20:28:39 -04:00
static UMetaSoundBuilderSubsystem & GetChecked ( ) ;
2023-09-18 14:32:59 -04:00
static const UMetaSoundBuilderSubsystem * GetConst ( ) ;
2023-05-10 20:28:39 -04:00
static const UMetaSoundBuilderSubsystem & GetConstChecked ( ) ;
2024-05-08 14:53:53 -04:00
UE_DEPRECATED ( 5.5 , " Use FDocumentBuilderRegistry::FindOrBeginBuilding, which is now only supported in builds loading editor-only data. " )
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
UMetaSoundBuilderBase & AttachBuilderToAssetChecked ( UObject & InObject ) const ;
2023-06-16 17:48:20 -04:00
2024-05-08 14:53:53 -04:00
UE_DEPRECATED ( 5.5 , " Use FDocumentBuilderRegistry::FindOrBeginBuilding (when editor only data is loaded) or MetaSoundEditorSubsystem::FindOrBeginBuilding call " )
2023-05-10 20:28:39 -04:00
UMetaSoundPatchBuilder * AttachPatchBuilderToAsset ( UMetaSoundPatch * InPatch ) const ;
2024-05-08 14:53:53 -04:00
UE_DEPRECATED ( 5.5 , " Use FDocumentBuilderRegistry::FindOrBeginBuilding (when editor only data is loaded) or MetaSoundEditorSubsystem::FindOrBeginBuilding call " )
2023-03-07 17:01:52 -05:00
UMetaSoundSourceBuilder * AttachSourceBuilderToAsset ( UMetaSoundSource * InSource ) const ;
2024-05-08 14:53:53 -04:00
UE_DEPRECATED ( 5.5 , " Moved to IDocumentBuilderRegistry::RemoveBuilderFromAsset " )
2023-08-02 14:35:48 -04:00
bool DetachBuilderFromAsset ( const FMetasoundFrontendClassName & InClassName ) const ;
2023-06-16 17:48:20 -04:00
2023-03-07 17:01:52 -05:00
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( ExpandEnumAsExecs = " OutResult " ) )
UPARAM ( DisplayName = " Patch Builder " ) UMetaSoundPatchBuilder * CreatePatchBuilder ( FName BuilderName , EMetaSoundBuilderResult & OutResult ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( ExpandEnumAsExecs = " OutResult " ) )
UPARAM ( DisplayName = " Source Builder " ) UMetaSoundSourceBuilder * CreateSourceBuilder (
FName BuilderName ,
FMetaSoundBuilderNodeOutputHandle & OnPlayNodeOutput ,
FMetaSoundBuilderNodeInputHandle & OnFinishedNodeInput ,
TArray < FMetaSoundBuilderNodeInputHandle > & AudioOutNodeInputs ,
EMetaSoundBuilderResult & OutResult ,
EMetaSoundOutputAudioFormat OutputFormat = EMetaSoundOutputAudioFormat : : Mono ,
bool bIsOneShot = true ) ;
2023-09-05 17:54:02 -04:00
2023-05-30 14:39:48 -04:00
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( ExpandEnumAsExecs = " OutResult " ) )
UPARAM ( DisplayName = " Patch Preset Builder " ) UMetaSoundPatchBuilder * CreatePatchPresetBuilder ( FName BuilderName , const TScriptInterface < IMetaSoundDocumentInterface > & ReferencedPatchClass , EMetaSoundBuilderResult & OutResult ) ;
2023-06-15 13:50:27 -04:00
UMetaSoundBuilderBase & CreatePresetBuilder ( FName BuilderName , const TScriptInterface < IMetaSoundDocumentInterface > & ReferencedPatchClass , EMetaSoundBuilderResult & OutResult ) ;
2023-05-30 14:39:48 -04:00
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( ExpandEnumAsExecs = " OutResult " ) )
UPARAM ( DisplayName = " Source Preset Builder " ) UMetaSoundSourceBuilder * CreateSourcePresetBuilder ( FName BuilderName , const TScriptInterface < IMetaSoundDocumentInterface > & ReferencedSourceClass , EMetaSoundBuilderResult & OutResult ) ;
2023-03-07 17:01:52 -05:00
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Bool Literal " ) )
UPARAM ( DisplayName = " Bool Literal " ) FMetasoundFrontendLiteral CreateBoolMetaSoundLiteral ( bool Value , FName & DataType ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Bool Array Literal " ) )
UPARAM ( DisplayName = " Bool Array Literal " ) FMetasoundFrontendLiteral CreateBoolArrayMetaSoundLiteral ( const TArray < bool > & Value , FName & DataType ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Float Literal " ) )
UPARAM ( DisplayName = " Float Literal " ) FMetasoundFrontendLiteral CreateFloatMetaSoundLiteral ( float Value , FName & DataType ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Float Array Literal " ) )
UPARAM ( DisplayName = " Float Array Literal " ) FMetasoundFrontendLiteral CreateFloatArrayMetaSoundLiteral ( const TArray < float > & Value , FName & DataType ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Int Literal " ) )
UPARAM ( DisplayName = " Int32 Literal " ) FMetasoundFrontendLiteral CreateIntMetaSoundLiteral ( int32 Value , FName & DataType ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Int Array Literal " ) )
UPARAM ( DisplayName = " Int32 Array Literal " ) FMetasoundFrontendLiteral CreateIntArrayMetaSoundLiteral ( const TArray < int32 > & Value , FName & DataType ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Object Literal " ) )
UPARAM ( DisplayName = " Object Literal " ) FMetasoundFrontendLiteral CreateObjectMetaSoundLiteral ( UObject * Value ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Object Array Literal " ) )
UPARAM ( DisplayName = " Object Array Literal " ) FMetasoundFrontendLiteral CreateObjectArrayMetaSoundLiteral ( const TArray < UObject * > & Value ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound String Literal " ) )
UPARAM ( DisplayName = " String Literal " ) FMetasoundFrontendLiteral CreateStringMetaSoundLiteral ( const FString & Value , FName & DataType ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound String Array Literal " ) )
UPARAM ( DisplayName = " String Array Literal " ) FMetasoundFrontendLiteral CreateStringArrayMetaSoundLiteral ( const TArray < FString > & Value , FName & DataType ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Create MetaSound Literal From AudioParameter " ) )
UPARAM ( DisplayName = " Param Literal " ) FMetasoundFrontendLiteral CreateMetaSoundLiteralFromParam ( const FAudioParameter & Param ) ;
2023-10-31 17:16:11 -04:00
// Returns the builder manually registered with the MetaSound Builder Subsystem with the provided custom name (if previously registered)
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Find Builder By Name " ) )
2023-06-22 14:51:42 -04:00
UPARAM ( DisplayName = " Builder " ) UMetaSoundBuilderBase * FindBuilder ( FName BuilderName ) ;
2023-10-31 17:16:11 -04:00
// Returns the builder associated with the given MetaSound (if one exists, transient or asset).
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " , meta = ( DisplayName = " Find Builder By MetaSound " ) )
UPARAM ( DisplayName = " Builder " ) UMetaSoundBuilderBase * FindBuilderOfDocument ( TScriptInterface < const IMetaSoundDocumentInterface > InMetaSound ) const ;
// Returns the patch builder manually registered with the MetaSound Builder Subsystem with the provided custom name (if previously registered)
2023-03-07 17:01:52 -05:00
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
UPARAM ( DisplayName = " Patch Builder " ) UMetaSoundPatchBuilder * FindPatchBuilder ( FName BuilderName ) ;
2023-10-31 17:16:11 -04:00
// Returns the source builder manually registered with the MetaSound Builder Subsystem with the provided custom name (if previously registered)
2023-03-07 17:01:52 -05:00
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
UPARAM ( DisplayName = " Source Builder " ) UMetaSoundSourceBuilder * FindSourceBuilder ( FName BuilderName ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
UPARAM ( DisplayName = " Is Registered " ) bool IsInterfaceRegistered ( FName InInterfaceName ) const ;
2023-07-24 17:38:26 -04:00
# if WITH_EDITOR
2024-05-08 14:53:53 -04:00
UE_DEPRECATED ( 5.5 , " No longer required as reload is now just directly called on a given builder. " )
void PostBuilderAssetTransaction ( const FMetasoundFrontendClassName & InClassName ) { }
2023-07-24 17:38:26 -04:00
# endif // WITH_EDITOR
2023-06-22 14:51:42 -04:00
// Adds builder to subsystem's registry to make it persistent and easily accessible by multiple systems or Blueprints
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
void RegisterBuilder ( FName BuilderName , UMetaSoundBuilderBase * Builder ) ;
2023-03-07 17:01:52 -05:00
// Adds builder to subsystem's registry to make it persistent and easily accessible by multiple systems or Blueprints
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
void RegisterPatchBuilder ( FName BuilderName , UMetaSoundPatchBuilder * Builder ) ;
// Adds builder to subsystem's registry to make it persistent and easily accessible by multiple systems or Blueprints
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
void RegisterSourceBuilder ( FName BuilderName , UMetaSoundSourceBuilder * Builder ) ;
2024-08-23 21:59:54 -04:00
// Sets the targeted page for all MetaSound graph & input default to resolve against.
// If target page is not implemented (or cooked in a runtime build) for the active platform,
// uses order of cooked pages(see 'Page Settings' for order) falling back to lower index - ordered page
// implemented in MetaSound asset. If no fallback is found, uses default graph/input default.
2024-06-27 23:26:57 -04:00
UFUNCTION ( BlueprintCallable , Category = " MetaSounds|Pages " )
UPARAM ( DisplayName = " TargetPageChanged " ) bool SetTargetPage ( FName PageName ) ;
2023-06-22 14:51:42 -04:00
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
UPARAM ( DisplayName = " Unregistered " ) bool UnregisterBuilder ( FName BuilderName ) ;
2023-03-07 17:01:52 -05:00
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
UPARAM ( DisplayName = " Unregistered " ) bool UnregisterPatchBuilder ( FName BuilderName ) ;
UFUNCTION ( BlueprintCallable , Category = " Audio|MetaSound|Builder " )
UPARAM ( DisplayName = " Unregistered " ) bool UnregisterSourceBuilder ( FName BuilderName ) ;
2023-06-16 17:48:20 -04:00
private :
2023-10-31 17:16:11 -04:00
friend class UMetaSoundBuilderBase ;
2023-03-07 17:01:52 -05:00
} ;