I have not been able to figure out how can I constrain the resizing of the window in windowed mode.
For example I don’t want players to be able to drag the corner of the window and make it smaller than 1024x768.
I don’t find anything online telling me how I can do this, so is this somehow possible ?
I don’t believe you can accomplish this with blueprints but if you’re using the engine source code in your project you can go to GameEngine.cpp and find the function UGameEngine::CreateGameWindow()
The comment for ESizingRule::FixedSize says “The windows size fixed and cannot be resized”.
By reading that it looks like I can’t change the window size at all after creation? I want players to be able to change the size of the window, but just not make it smaller than X.
…and now I went looking at the SWindow class ( SWindow | Unreal Engine Documentation ) and I see there is SizeLimits which then has SetMinWidth/SetMinHeight… sounds like that is what I want. I just can’t test it now since I don’t have the engine source in my project (will add later if needed)…
My project is a C++ project, do you know if there is any way to get a hook to the game window from C without adding the engine code to the project?
I don’t know of any clever hooks that wouldn’t require engine code, sorry. but I can say with FixedSize I can still resize the window programmatically at runtime in my project, I just can’t click to drag resize.