8#include "CoreMinimal.h"
9#include "GameFramework/Actor.h"
10#include "Engine/TextureRenderTarget2D.h"
14#include "WindowActor.generated.h"
33 AWindowActor(
const FObjectInitializer& ObjectInitializer);
35 UFUNCTION(BlueprintCallable)
36 void SetupWindow(int32 Width = 1280, int32 Height = 720, FString Title =
"Window", UTextureRenderTarget2D* TextureRenderTarget =
nullptr);
38 UFUNCTION(BlueprintCallable)
39 void SetupTextureRenderTarget(UTextureRenderTarget2D* TextureRenderTarget);
41 UFUNCTION(BlueprintCallable)
42 void AddWidgetToWindow(UWidget* WidgetToAdd);
44 UFUNCTION(BlueprintCallable)
45 void RemoveWidgetFromWindow(UWidget* WidgetToAdd);
47 UFUNCTION(BlueprintCallable)
48 void ResizeWindow(int32 Width = 1280, int32 Height = 720);
53 UFUNCTION(BlueprintCallable)
65 virtual void BeginPlay()
override;
67 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
71 void OnWindowClosed(
const TSharedRef<SWindow>& Window);
FOnWindowClosed OnWindowClosedDelegate
TSharedPtr< FUnrealWindow > GetUnrealWindow()
TSharedPtr< FUnrealWindow > UnrealWindow