Created
September 2, 2022 10:03
-
-
Save FilipSivak/4f8255c64a82512d39eb330c65074528 to your computer and use it in GitHub Desktop.
Prevent window resizing in Unreal Engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool UWindowResizeBlueprintLibrary::SetWindowNoResize(FText WindowName) | |
{ | |
const TSharedPtr<SDockTab> ActiveTab = FGlobalTabmanager::Get()->GetActiveTab(); | |
if(ActiveTab.IsValid()) | |
{ | |
const TSharedPtr<SWindow> Window = ActiveTab->GetParentWindow(); | |
if(Window.IsValid() && Window->GetTitle().EqualTo(WindowName)) | |
{ | |
Window->SetSizingRule(ESizingRule::FixedSize); | |
return true; | |
} | |
UE_LOG(LogTemp, Error, TEXT("ActiveTab window not valid!")); | |
return false; | |
} | |
UE_LOG(LogTemp, Error, TEXT("ActiveTab is not valid!")); | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment