Giter Site home page Giter Site logo

oual-id / unityshowandroidstatusbar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from over17/unityshowandroidstatusbar

0.0 0.0 0.0 84 KB

Show Android status bar for applications built with Unity 5.3 and later

License: MIT License

Java 100.00%

unityshowandroidstatusbar's Introduction

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

  1. Works with Unity 5.3+
  2. Add the plugin to your project. You need the manifest and the AAR (Assets/Plugins/Android/AndroidManifest.xml and Assets/Plugins/Android/unityShowAndroidStatusBar.aar)
  3. 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
  4. If you don't want the status and navigation bars to be translucent, change the theme in manifest from UnityTransparentStatusBarTheme to UnityStatusBarTheme
  5. Add Screen.fullScreen = false; to your Start() method if you want the status bar shown on KitKat+ devices
  6. Enjoy

How to Build

  1. Put Unity's classes.jar into src/UnityShowAndroidStatusBar/libs/
  2. 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

unityshowandroidstatusbar's People

Contributors

over17 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.