I've made a new 2D Unity Project in v2020.3.25f1 and set Fullscreen Mode to "Maximized Window".
When I build the app the whole screen is filled:
But when I exit full screen, reopen the app and switch back to full screen I get this:
Is this a bug? Is it caused by MacOS? It's driving me insane. ;(
Unity saves the last resolution you left the application at. If you left it at 800x600, next time you launch it it will be 800x600.
When you exit fullscreen, it makes the app another aspect ratio. When you re-launch it, it re-launches at the weird aspect ratio.
Solution Idea 1
You could enable resizable window, that will most likely be a quick solution.
Solution Idea 2
You could also force the game to be a certain resolution when the game starts.
Screen.SetResolution(WIDTH, HEIGHT, IS_FULLSCREEN);
So in your case, it would be (assuming your screen is 1080p)
Screen.SetResolution(1920, 1080, true);
Related
I have a sin up page that works very well, but when I switch to landscape mode, there is a small black flash on the screen that also disappears very early. flutter
I created a sign up page on flutter but when I switch from portrait to landscape mode, I see a black square appear on the screen before it disappears
When change the device orientation (by rotate the device) an black screen is painted in the bounds
what are the cases that can cause this?
I wanted to share my solution which is quite easy compared to my question above. Maybe it will save someone's time.
the black edge that appears when the device pivots (see image) disappeared during the execution of a release (flutter run apk --release).
suddenly everything is going well.
I have developed a Mac-OSX standalone app in Unity3D (Scale with Resolution: 1920x1080). Most of the time I present the app on my laptop, connected to an external screen, which works pretty well.
But when I'm on the road and use the app on my laptop screen (1440x900), the UI's are all over the place...
I know, BUT is there a way to run the app in a 16:9 ratio (with black bars on the top and bottom), the same as I can do it in the Unity3D editor?
I don't want to go back and re-scale everything to a lower resolution, as this would be a crazy job :(
Is there any solution without re-doing it?
Cheers
Thanks, but sadly this didn't work for me. The problem is my Reference Resolution in the Canvas Scaler is already set to 1920x1080. To fix this, I have to lower the reference, but this means re-doing all the UI's.
However, I found a workaround, which is strange but working. I have set the Default Screen Resolution in Unity to 1920x1080 as in the image/link below.
Now the strange part :)
1. Start the app with the option key on an HD screen and set the resolution to 1920x1080.
2. Save and Quit
3. Now the app is scaled down to 16:9 and keeps everything in place.
This works as long as you don't start this app or any other Unity build, with the option key on a lower resolution screen. In this case it will scale everything back again. You can redo the steps 1-3 and it will work again.
Not sure if there is another way to do this, but at least I have kind of a solution.
Default Screen Resolution in Unity to 1920x1080
There are two things you should check; 'Resolution and Presentation' under 'Player Settings', and canvas scalers. I have being in a situation similar to yours, I had built an iOS application meant for the vertical orientation, but also wanted to test it on macOS, the application launched correctly in fullscreen mode looking like this (The top status bar was intentionally brought down to show the aspect ratio):
Instead of using black bars on the sides, it seems like that Unity simply used the colour of the canvas of the current scene to fill in the gaps. This was my settings to get this result:
Only the 16:10 ratio (MacBook Pro) was checked, but the application functions in the iPhone's vertical ratio, I did not have to manually rescale the canvas,I simply switched the build platform, this was allowed by the canvas scalers I have added onto every canvas with the following setting (UI Scale mode: Scale with screen size | Screen match mode: expand), this would allow the canvas to expand automatically and scale to any aspect ratio, without messing up the UI:
Hope this Helps!
I have Unity personal so I have to show the splash screen (that is customizable in the latest versions of Unity) but I noted a weird behavior of it.In my older games my first scene show up right after the splash screen ended but now in my project the first scene seems to start loading only after the Unity splash screen ends.In fact after the splash screen a white screen show up until the scene is loaded.I've tried to set the splash screen time to 30 seconds, to give the game enough time to load, but nothing happened, after it, whether it lasts 2 or 30 seconds, the white screen still show up before the first scene and this is quite annoying because my first scene is quite big and it takes up to 10 seconds to load.My question is, is it possible to fade out the Unity splash screen only when the first scene is ready?I hope to have explained myself well and thank you!
According to the documentation for Unity 2017.1:
The Unity Splash Screen is uniform across all platforms. It displays
promptly, displaying while the first Scene loads asynchronously in the
background. This is different to your own introductory screens or
animations which can take time to appear; this is due to Unity having
to load the entire engine and first Scene before displaying them.
So with Unity 2017 you should get the desired behaviour. Since you tagged "Unity5", I think that you might not be using the most recent version. You should try to update to Unity 2017. Other than that there is nothing you can do since your license forces you do keep this splash screen
Edit
Seeing your comment, it seems that your scene is just really long to load. Longer thant the splash screen.
First thing: if this is an empty scene, it should be faster. Maybe your device is just too old. Is it quicker on the Editor on your computer? If it is an empty scene and it is that slow on a modern computer, you should contact Unity support.
If the scene is indeed big and long to load, you have two options:
You can try to improve your loading time. Use the profiler in Unity to identify the parts of yor code that are slow. Have a good look at your Start and Awake methods. If something is really long, you can try to load it step by step in a coroutine
You can add a first scene that is empty, just containing an image or text saying "loading" and this scene immediately loads your main scene. This won't improve perfs but will let users have a waiting screen instead of a blank one
I've implemented video play functionality within my app, and everything is working perfectly, except for this one issue. Whenever the fullscreen toggle button is tapped, or if you double-tap the screen, this of course is meant to toggle the video from being played in it's natural wide screen state (black is seen above and below the video) to a zoomed state, where the video takes up the entire screen of 480x320. For me, the video adjusts slightly in size, but doesn't come close to taking up the entire screen. This works correctly in almost every app I can think of that plays videos, such as Fandango, YouTube, etc.
In this zoomed mode, of course you're losing part of the picture, because it's actually off the screen, since the only way to render a 2.40:1 image on the full screen while still maintaining aspect ratio is to zoom. Again, every other app I can think of works this way, but it's not working for me.
So, I have tried everything I can think of to get this full screen zoomed feature to work, but no luck.
Any ideas?
After some testing, it appears that this is due to the format/encoding of the video itself. I don't know specficis, however. I just know that depending on which video is being played, this feature may or may not work.
I recently deployed my first iPhone app, a simple game, to my testing iPhone for the first time. Everything looks and runs fine on the simulator in Xcode, but on the iPhone the whole image is shifted up about 10 pixels or so. So the gameplay goes slightly offscreen on top and has a slim white/grey bar at the bottom. Has anyone encountered this before? I do have the status bar display turned off, I'm wondering if the device handles that flag differently than the simulator. I also have the rotation hardcoded to be in portraitRight mode at all times, and I have an extra line in the code to make the simulator do that automatically that's apparently not necessary on the device.
Everything is very simple, so I'm not sure where this glitch is coming from or even where to look.
Did you use Interface Builder to create your UI? If you did, then go and check each and every XIB file(s) objects' Size & Position as well as Autosizing in Size Inspector (command-3).
It's very important to check both: your coordinates might have gone wrong after some change you did and autoscaling works in weird ways unless you attach to correct edges. Apple documentation should help http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/IB_UserGuide/Layout/Layout.html