Skip to content

Instantly share code, notes, and snippets.

@FilipSivak
Created September 2, 2022 10:03
Show Gist options
  • Save FilipSivak/4f8255c64a82512d39eb330c65074528 to your computer and use it in GitHub Desktop.
Save FilipSivak/4f8255c64a82512d39eb330c65074528 to your computer and use it in GitHub Desktop.
Prevent window resizing in Unreal Engine
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