Scaffold render target library

This commit is contained in:
Filip Iliescu
2025-04-29 15:40:38 -07:00
parent 22e2b0a419
commit 8dc892b9fa
2 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,25 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "LRRenderUtilLibrary.generated.h"
/**
*
*/
UCLASS()
class LUCKYWORLDV2_API ULRRenderUtilLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "Render Utilities")
UTextureRenderTarget2D* CaptureMeshToRenderTarget(UStaticMeshComponent* MeshComp, const FVector2D& ImageSize, UObject* WorldContextObject);
private:
void SetupSceneCaptureForMesh(USceneCaptureComponent2D* SceneCapture, UStaticMeshComponent* MeshComp);
};