Consistent width / height in FScreen when resizing window in Unity Editor #205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When testing in free aspect window in Unity editor, if you resize the window, the width and height are no longer valid as soon as the screen orientation is not the same as the initial orientation.
You can test with the Banana demo, if you start in landscape mode and resize to portrait mode, the game is no longer adapted to the screen size as it has wrong width and height returned by Futile.screen.
I'm aware this is not a critical issue as it only happens in the Editor (unless you can resize dynamically the web player too?), but this modification is handy to check orientation change in real time in the Unity Editor (as long as you test (Futile.screen.width<Futile.screen.height) to decide is your layout is in portrait mode).