Hello!
How to remove the white progress bar at the bottom, or make it work the second time, this can be done for the iOS build, but there is no such option in WebGL?
Thanks.
You can modify the HTML template container for the webgl app. This progress bar is handled on the JS side of things.
This is the iOS home indicator. You cannot influence it from HTML, only avoid it. Even with native apps, you only have limited ways to influence it (the hiding option is intended for non-interactive content and a bad fit for games, you can only defer system gestures to make it a bit more transparent).
Not sure if Screen.safeArea works properly in WebGL. You could edit the HTML template to shrink the game view using HTML/CSS.
What you gave there are recommendations for shifting content to other coordinates.
If I slide the bottom panel up there will be a black bar at the bottom and the game screen will be smaller or I will have to change the buttons
If you could lock the orientation of landscape mode on an iOS iPhone, you could flip the screen so that this bar was at the top. But on an iPhone, you can only lock portrait orientation, and you can’t lock landscape orientation.
Because of this indicator there are a huge number of problems, has Unity really not solved this problem for Webgl assemblies?
There’s nothing Unity can do. The home indicator is a system-wide UI on iOS and Apple provides no APIs to completely hide it. This is an UX decision by Apple, every iOS app has to accommodate the home indicator in some way.
The only option for native iOS games is to make it slightly more transparent. For WebGL, the APIs are further limited and you cannot control the home indicator in any way. Even for PWAs, which have an extended API and are allowed to appear more native, there’s only an option to control the status bar, not the home indicator.
Until Apple adds the necessary APIs, which I’m highly doubtful they ever will, you can only change your UI to accommodate the home indicator. This is the same for anything that runs on iOS.
https://defensezone.net/video_2024-05-02_11-49-35.mp4
Watch the video, in this example I can use the bottom interface of my game and the indicator is not activated, but if I try to move the indicator 2 times, it is activated.
This option is available in the Unity build so that the indicator is activated only after clicking again.
Can Unity make the same option in the WebGL build?
or maybe you can enable the same option in browsers for iOS?
This is the defer system gestures option I mentioned before.
As I said, there are no options to influence the home indicator available to WebGL. The home indicator is the way it is and you can’t change it. Unity cannot do anything, either, because Apple hasn’t added the Web APIs to do so. Unless Apple adds the necessary APIs, there’s nothing that can be done.