i create custom scenecomponent:
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class CAVEHYPERCUBUS_API UTestComponent : public USceneComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UTestComponent();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Cave)
class UTextureRenderTarget2D* LeftRenderTarget;
UTestComponent::UTestComponent()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
PrimaryComponentTick.bCanEverTick = false;
USceneCaptureComponent2D* LeftSC = CreateDefaultSubobject<USceneCaptureComponent2D>(TEXT("LeftSceneCapture"));
LeftSC->SetupAttachment(this);
LeftSC->TextureTarget = LeftRenderTarget;
}
but it seems dont have any effect.