Uni Safe Area Adjuster by Goropocha - 1


Unity plugin that adjust canvas to safe area of iOS.

Unknown VersionMIT LicenseUpdated 357 days agoCreated on October 13th, 2018
Go to source


What’s This?

Unity plugin that adjust canvas to Safe Area without play at Editor or build in iOS.
Available Orientation: Landscape and Portrait
Available iPhone: iPhone X, iPhone XS, iPhone XR, iPhone XS Max, iPad Pro 11, iPad Pro 12.9 (3rd generation)

Sample Project was created Unity version 2018.3.13f1.

Landscape Safe Area GIF

Portrait Safe Area GIF

How to Use

  1. Adjust GameScene Screen (See the following screen. If you use 2018.3 or higher, then you needn’t to create custom aspects.)
    Adjust GameScene Screen
  2. Create GameObject into Canvas and atach SafeAreaAdjuster.cs to GameObject you created. Then, set UI Game Objects (Such as Image, Text, ScrollRect ect…) to child of it. (See the following screenshot. In the next screenshot, the Text GameObjects corresponds to the SafeArea GameObject.)
  3. SafeArea Game object RectTransform should be spread out as shown below:
    Game object RectTransform
  4. Done.

How to Customize Safe Area

  1. Open SafeAreaAdjusterSimulateData.cs
  2. Add New SafeArea type to SimulateType.
  3. Add New Resolution (px) to public static Vector2Int[] Resolutions. You must match SimulateType and the index of array.
  4. Add New SafeArea’s Resolution (px) to public static Rect[,] SafeAreaResolutions. You must match SimulateType and the index of array.

Document (Japanese)


Version History

1.1.0 (April 21, 2019)

  • Support iPad Pro 11, iPad Pro 12.9 (3rd generation)
  • Fixed Problem about Screen.Width and Height if you use Unity versin 2018.3.3 or above.

1.0.0 (October 18, 2018)

  • First release




The MIT License

Show all projects by Goropocha