When building my game for Android using Unity version 6000.1.0, the device status bar remains visible on the Android device, even when set to “Full Screen.” The same build on the previous version, 6000.0.47, does not have this issue. If I enable “Render in Safe Area,” it “hides” the status bar, but it renders over the notch, which I don’t want.
I read about this change in the new Unity version on the Changelog page:
Android: Unity now uses WindowInsetsController and setDecorFitsSystemWindows APIs on Android 11 or newer versions instead of setSystemUiVisibility API. This affects the behavior of Unity APIs: Fullscreen Mode, Hide Navigation Bar, and Render outside safe area. The application appearance remains the same on devices using Android 10 or older compared to Android 11 or newer versions.
I ended up enabling the “Render in Safe Area” option in the Player Settings. Then, via code, I ensured rendering only within the safe area to avoid drawing over the notch.
I have been facing the same issue, a friend found a script that can be assigned (or at least im doing it like that) in a gameobject in the scene. In my devices whenever i minimize and return to the app it wont display the navbar but a rearrangement of the game that maybe cant be a big ideal but still i am also hoping unity fix this to not depend on script or other methods. im leaving the script below
In android 10 and below if you set in player settings Fullscreen mode, it will hide notification bar (upper bar) and the navbar(bottom bar where you can go back or go the main home launcher), it works fine when you open the app for the first time but if you minimize the app, lock/shut down the screen or change to a different app and then return to the unity game or program on android the navbar (bottom bar) at least for me displays hiding part of the game, if you select “render over native ui” it will keep display the navbar but this time transparent but the icons like the back or home button will be still there disrupting the game
I will do later and submit feedback, but since im new also, id like to ask the difference for gameactivity and activity and what does it has to do when building the apk/bundle
To Tomas, I’m on 6000.2.9f and this still happens. The fix you linked is for the navigation bar which is at the bottom, but this thread is for the status bar which is at the top. It makes it extra bad for landscape mode as not only does it still render a horizontal status bar at the top of the screennit also renders outside the safe zone. Would be great to fix.
So yes, you can set it to true but it defeats the purpose of what some of us are trying to do and how it used to be. The way it worked before with having RenderOutsideSafeArea turned off was that the render window would only be drawn to the safe area, and the rest would be black. Now, it renders the status bar at the top, but also doesn’t correctly render inside of the safe area when the phone is sideways. It’s pretty undesirable.
The problem persists in Unity 6.2.6f2 too.
We are talking of the top bar, so the status bar; not the navigation bar at bottom.
The only fix that worked is to enable Render outside safe area, but this is not a solution to the problem.