Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Over17/UnityShowAndroidStatusBar
Show Android status bar for applications built with Unity 5.3 and later
https://github.com/Over17/UnityShowAndroidStatusBar
Last synced: 2 months ago
JSON representation
Show Android status bar for applications built with Unity 5.3 and later
- Host: GitHub
- URL: https://github.com/Over17/UnityShowAndroidStatusBar
- Owner: Over17
- License: mit
- Created: 2016-04-09T18:35:07.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-05T13:52:51.000Z (over 6 years ago)
- Last Synced: 2024-07-14T14:31:12.724Z (7 months ago)
- Language: Java
- Size: 82 KB
- Stars: 148
- Watchers: 18
- Forks: 35
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
- awesome-unity-open-source-on-github - UnityShowAndroidStatusBar - Show Android status bar (Android)
README
# UnityShowAndroidStatusBar
Since Unity 5.3, there's no more option to enable the status bar for Android builds. However, if you are building a non-fullscreen non-immersive application with Unity and want to keep the status bar, you may want to use this plugin.## Effect
For KitKat (Android 4.4) and later, where the immersive fullscreen mode is available, status bar is shown only when the immersive mode is off, so you have to set Screen.fullScreen to false in your scripts.
For JellyBean (Android 4.3) and earlier, when fullScreen is set to true, "lights out" mode is enabled - navigation and status bar are shown but dimmed. When fullScreen is set to false, full navigation and status bar are shown.
By default fullScreen is set to true in Unity.
This plugin also enables translucent status and navigation bars on KitKat (Android 4.4) and later versions by default. Follow the instructions in **Usage** to make them opaque.## Usage
0. Works with Unity 5.3+
1. Add the plugin to your project. You need the manifest and the AAR (Assets/Plugins/Android/AndroidManifest.xml and Assets/Plugins/Android/unityShowAndroidStatusBar.aar)
2. Please pay attention to the manifest - you may want to use the one provided here or, if you have your own base manifest, please make sure to use `com.unity3d.nostatusbar.UnityPlayerActivityStatusBar` activity as the MAIN/LAUNCHER one
3. If you don't want the status and navigation bars to be translucent, change the theme in manifest from `UnityTransparentStatusBarTheme` to `UnityStatusBarTheme`
4. Add `Screen.fullScreen = false;` to your `Start()` method if you want the status bar shown on KitKat+ devices
5. Enjoy## How to Build
0. Put Unity's classes.jar into src/UnityShowAndroidStatusBar/libs/
1. Run `gradlew assemble` from src/UnityShowAndroidStatusBar/## See Also
Please refer to Google documentation for more details: https://developer.android.com/training/system-ui/index.html