You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Version up source archetypes to become two interfaces: channel interfaces (mono/stereo) & base source namespace - Clean-up Interface panel to support namespacing better - Fix bugs with assuming interfaces are always and the only base namespace members - Allow namespacing for any arbitrary interface member - Add lock icon to clarify what interface members cannot be modified individually (i.e. cannot add, remove, or rename them as they are interface members) - Organize members alphabetically #jira UE-135000 #rnx #rb phil.popp #preflight 61a7d1079c77d610079303ec #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18344347 in //UE5/Release-5.0/... via CL 18344412 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18344446 by rob gay in ue5-release-engine-test branch]
71 lines
2.9 KiB
C++
71 lines
2.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "Engine/Engine.h"
|
|
#include "MetasoundAssetBase.h"
|
|
#include "MetasoundAssetManager.h"
|
|
#include "Subsystems/EngineSubsystem.h"
|
|
#include "UObject/Object.h"
|
|
|
|
#include "MetasoundAssetSubsystem.generated.h"
|
|
|
|
// Forward Declarations
|
|
class UAssetManager;
|
|
class FMetasoundAssetBase;
|
|
|
|
struct FDirectoryPath;
|
|
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct METASOUNDENGINE_API FMetaSoundAssetDirectory
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Directories, meta = (RelativePath, LongPackageName))
|
|
FDirectoryPath Directory;
|
|
};
|
|
|
|
/** The subsystem in charge of the MetaSound asset registry */
|
|
UCLASS()
|
|
class METASOUNDENGINE_API UMetaSoundAssetSubsystem : public UEngineSubsystem, public Metasound::Frontend::IMetaSoundAssetManager
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void Initialize(FSubsystemCollectionBase& InCollection) override;
|
|
|
|
void AddOrUpdateAsset(const FAssetData& InAssetData);
|
|
void RemoveAsset(UObject& InObject);
|
|
void RemoveAsset(const FAssetData& InAssetData);
|
|
void RenameAsset(const FAssetData& InAssetData, bool bInReregisterWithFrontend = true);
|
|
|
|
virtual void AddAssetReferences(FMetasoundAssetBase& InAssetBase) override;
|
|
virtual void AddOrUpdateAsset(UObject& InObject) override;
|
|
virtual bool CanAutoUpdate(const FMetasoundFrontendClassName& InClassName) const override;
|
|
virtual bool ContainsKey(const Metasound::Frontend::FNodeRegistryKey& InRegistryKey) const override;
|
|
virtual const FSoftObjectPath* FindObjectPathFromKey(const Metasound::Frontend::FNodeRegistryKey& RegistryKey) const override;
|
|
virtual TSet<Metasound::Frontend::FNodeRegistryKey> GetReferencedKeys(const FMetasoundAssetBase& InAssetBase) const override;
|
|
virtual void RescanAutoUpdateDenyList() override;
|
|
virtual FMetasoundAssetBase* TryLoadAsset(const FSoftObjectPath& InObjectPath) const override;
|
|
virtual FMetasoundAssetBase* TryLoadAssetFromKey(const Metasound::Frontend::FNodeRegistryKey& RegistryKey) const override;
|
|
virtual bool TryLoadReferencedAssets(const FMetasoundAssetBase& InAssetBase, TArray<FMetasoundAssetBase*>& OutReferencedAssets) const override;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "MetaSounds|Registration")
|
|
void RegisterAssetClassesInDirectories(const TArray<FMetaSoundAssetDirectory>& Directories);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "MetaSounds|Registration")
|
|
void UnregisterAssetClassesInDirectories(const TArray<FMetaSoundAssetDirectory>& Directories);
|
|
|
|
protected:
|
|
void PostEngineInit();
|
|
void PostInitAssetScan();
|
|
void RebuildDenyListCache(const UAssetManager& InAssetManager);
|
|
void SearchAndIterateDirectoryAssets(const TArray<FDirectoryPath>& InDirectories, TFunctionRef<void(const FAssetData&)> InFunction);
|
|
void SynchronizeAssetClassDisplayName(const FAssetData& InAssetData);
|
|
|
|
private:
|
|
int32 AutoUpdateDenyListChangeID = INDEX_NONE;
|
|
TSet<FName> AutoUpdateDenyListCache;
|
|
TMap<Metasound::Frontend::FNodeRegistryKey, FSoftObjectPath> PathMap;
|
|
};
|