Files
UnrealEngine/Engine/Plugins/Mutable/Source/CustomizableObject/Public/MuCO/CustomizableObjectSkeletalMesh.h
2025-05-18 13:04:45 +08:00

63 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MuR/Ptr.h"
#include "MuR/Model.h"
#include "MuR/Parameters.h"
#include "Engine/SkeletalMesh.h"
#include "CoreMinimal.h"
#include "CustomizableObjectSkeletalMesh.generated.h"
#define UE_API CUSTOMIZABLEOBJECT_API
namespace mu
{
typedef uint64 FResourceID;
}
class UCustomizableObjectInstance;
class UCustomizableObject;
class UCustomizableInstancePrivate;
class FUpdateContextPrivate;
class FCustomizableObjectMeshStreamIn;
struct FModelStreamableBulkData;
/**
* CustomizableObjectSkeletalMesh is a class inheriting from USkeletalMesh with the sole purpose of allowing skeletal meshes generated by Mutable
* to stream-in Mesh LODs.
*/
UCLASS(MinimalAPI)
class UCustomizableObjectSkeletalMesh : public USkeletalMesh
{
GENERATED_BODY()
friend FCustomizableObjectMeshStreamIn;
friend UCustomizableInstancePrivate;
UE_API void InitMutableStreamingData(const TSharedRef<FUpdateContextPrivate>& InOperationData, const FName& ComponentName, const int32 FirstLOD, const int32 LODCount);
//~ Begin UStreamableRenderAsset Interface.
UE_API virtual bool StreamIn(int32 NewMipCount, bool bHighPrio) override;
//~ End UStreamableRenderAsset Interface.
FString CustomizableObjectPathName;
TSharedPtr<FModelStreamableBulkData> ModelStreamableBulkData;
TSharedPtr<mu::FModel, ESPMode::ThreadSafe> Model;
/** Instance parameters at the time of creation. */
TSharedPtr<mu::FParameters> Parameters;
int32 State = -1;
/** Mesh IDs per LOD */
TArray<mu::FResourceID> MeshIDs;
TArray<TArray<uint32>> SurfaceIDs;
TArray<TPair<uint32, FName>> SkinWeightProfileIDs;
};
#undef UE_API