Skip to content

Commit 7806409

Browse files
committed
Updated the README with the possibility to change the setting in runtime
1 parent ecac464 commit 7806409

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Android devices with a notch (display cutout) have recently become quite common.
33

44
If you want to make use of the whole display surface area and render in the area "behind" the notch, you need to add code to your application. Fortunately, since Unity 2018.3 there is a special option in the Player settings called "Render outside safe area" which does exactly this. If you want to have the same option in earlier versions of Unity - this plugin was made for you!
55

6+
One advantage of this plugin over the built-in Unity solution is that it allows changing the setting in runtime if needed, by calling `public void SetRenderBehindNotch(bool enabled)` in `RenderBehindNotchSupport`.
7+
68
This plugin is targeted towards Unity 2017.4, however I see no reasons why it shouldn't work with earlier versions too.
79

810
## System Requirements
@@ -13,7 +15,8 @@ This plugin is targeted towards Unity 2017.4, however I see no reasons why it sh
1315
1. Copy the contents of `Assets` directory to your project
1416
2. Attach the `Assets/Scripts/RenderBehindNotchSupport.cs` script to a game object of your choice in your first scene to make sure the plugin is loaded as early as possible
1517
3. The script has a public boolean property so that you can tick/untick the checkbox to enable or disable rendering behind the notch with a single click
16-
4. Enjoy
18+
4. If you want to change the setting in runtime, call `public void SetRenderBehindNotch(bool enabled)` in `RenderBehindNotchSupport` class.
19+
5. Enjoy
1720

1821
## Useful Links
1922
-https://developer.android.com/guide/topics/display-cutout

0 commit comments

Comments
 (0)