I currently have a function to create a custom viewport and it is working, but I want to make it so this viewport opens in the window of a projector that I have connected to my laptop, does anybody know how to do this?
UFUNCTION(BlueprintCallable, Category = "Texture Processor")
void UVisualisationTextureProcessor::InitializeViewport()
{
// Create a new Slate brush to hold the UTexture2D
VisualisationSlateBrush = new FSlateBrush();
// Create a Slate image widget to display the Slate brush
TSharedRef<SImage> ImageWidget = SNew(SImage)
.Image(VisualisationSlateBrush);
ImageWidgetPtr = ImageWidget;
// Create the secondary window to contain the image widget
TSharedRef<SWindow> SecondWindow = SNew(SWindow)
.Title(FText::FromString(TEXT("Visualisation Viewport")))
.ClientSize(FVector2D(1920, 1080))
.Content()
[
ImageWidget
];
// Store a weak reference to the window
SecondWindowPtr = SecondWindow;
FSlateApplication::Get().AddWindow(SecondWindow);
}