0 votes

Hello everyone,

I am developing a game in godot version 3.2.3 with immersive mode enabled. When exported to android mobile (Samsung M30) it is working properly as I needed.

Yesterday I downloaded the latest version 3.3, but in this version if immersive mode is enabled the game covers full screen including the camera area. So the top portion of the game gets cutoff. It is fixed If immersive mode is disabled but then the navigation keys become visible.

Is there any setting in the new version so that the navigation bar is covered by the game but not the notification bar at the top? (The same project still looks proper if exported from older version)

Second question, should I use newer version for development purpose (as it may have more features), & when the development is completed, export the project from older version? Will such project always run from older version (if in case any of the new features are used) ?

Thanks

Godot version 3.3
in Engine by (48 points)

1 Answer

+1 vote
Best answer

This was originally submitted in a proposal and it seems this feature is now implemented in 3.3.

You can use OS.get_window_safe_area() to return the Rect2 where controls should be rendered. Use this in a script to move controls away from the top so they don't touch the notch.

Second question, should I use newer version for development purpose (as it may have more features), & when the development is completed, export the project from older version? Will such project always run from older version (if in case any of the new features are used) ?

If you are working under a deadline and don't need features from a newer version, it's recommended to stick to the version you're currently using during the course of the project. Otherwise, you can upgrade to new versions if you're OK with dealing with occasional regressions.

by (9,328 points)
selected by

Thank you for your quick reply. So actually this is a feature in newer version :)

I used the function suggested by you to find the usable area rect. OS.get_window_safe_area() returns (0, 0, 1080, 2257) in v3.2.3 whereas it returns (0, 83, 1080, 2257) in v3.3. So moving my score panel to rect.y in script solved my problem, thanks.

I noticed that returned Y position is more than actual. Because, in case of v3.2.3 the panel is just below the camera notch whereas in v3.3 it is much lowered. (i.e. physically it is not on the same location in both cases). Anyway, after getting the usable rectangle, if Y position is not zero I can subtract some pixels to achieve the required results.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.