Disable/Enable Status Bar

I know that you can hide the Status bar in the settings. However I need to be able to hide it while the application is running via code. Is this even possible?
I have looked around and could not find anything related to this.

Thx

It should be there by default. If not,you can use the Terminal window to do it. Just follow the commands below.

  1. Install dconf-tool by typing this command into the Terminal window:

sudo apt-get install dconf-tools

  1. Verify the Unity 2D option with this command:

dconf list /com/canonical/unity-2d/launcher/

  1. Type in the following command to disable auto-hide:

dconf write /com/canonical/unity-2d/launcher/use-strut true

  1. To reenable auto-hide, use this command:

dconf write /com/canonical/unity-2d/launcher/use-strut 0

If your target platforms are iOS & Android, you may use this:

PlayerSettings.statusBarHidden = true;