Skip to content

mrvcmrvc/SafeArea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safe Area

Safe Area is a Unity UGUI package that fits a target RectTransform to the current device safe area. It is useful for keeping UI away from notches, rounded corners, and system gesture areas.

How to install

Add from OpenUPM by scoped registry
  • open Edit/Project Settings/Package Manager
  • add a new Scoped Registry:
    Name: OpenUPM
    URL:  https://package.openupm.com/
    Scope(s): com.mrvc
    
  • click Save
  • open Package Manager
  • click +
  • select Add from Git URL
  • paste com.mrvc.safearea
  • click Add

Use

  1. Add CanvasHelper to the same GameObject as your Canvas.
  2. Assign the RectTransform that should stay inside the safe area.
  3. Choose which edges should respect the safe area.
  4. Optionally select a preview device in the custom inspector while working in the editor.

About

Safe Area is a Unity UGUI package that fits a target RectTransform to the current device safe area. It is useful for keeping UI away from notches, rounded corners, and system gesture areas.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors