8#include "CoreMinimal.h"
9#include "GameFramework/Actor.h"
10#include "Engine/TextureRenderTarget2D.h"
14#include "WindowActor.generated.h"
32 AWindowActor(
const FObjectInitializer& ObjectInitializer);
34 UFUNCTION(BlueprintCallable)
35 void SetupWindow(
int Width = 1280,
int Height = 720, FString Title =
"Window", UTextureRenderTarget2D* TextureRenderTarget =
nullptr);
37 UFUNCTION(BlueprintCallable)
38 void SetupTextureRenderTarget(UTextureRenderTarget2D* TextureRenderTarget);
40 UFUNCTION(BlueprintCallable)
41 void AddWidgetToWindow(UWidget* WidgetToAdd);
43 UFUNCTION(BlueprintCallable)
44 void RemoveWidgetFromWindow(UWidget* WidgetToAdd);
46 UFUNCTION(BlueprintCallable)
47 void ResizeWindow(
int Width = 1280,
int Height = 720);
58 virtual void BeginPlay()
override;
60 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
64 void OnWindowClosed(
const TSharedRef<SWindow>& Window);
FOnWindowClosed OnWindowClosedDelegate
TSharedPtr< FUnrealWindow > GetUnrealWindow()
TSharedPtr< FUnrealWindow > UnrealWindow