'Unity Safe Area Fitter' provides safe area RectTransform with Unity.
Unity 2021.3 or higher.
Via Package Manager.
Open the Package Manager window in your Unity editor, select Add package from git URL... from the + button in the top left, enter following and press the Add button.
https://github.com/neuneu9/unity-safe-area-fitter.git?path=Packages/jp.neuneu9.safe-area-fitter
Or open the Packages/manifest.json file and add an item like the following to the dependencies field.
"jp.neuneu9.safe-area-fitter": "https://github.com/neuneu9/unity-safe-area-fitter.git?path=Packages/jp.neuneu9.safe-area-fitter",Just press the Add Component button on any GameObject that has a Rect Transform and select Safe Area Fitter.
You can also fit children of Safe Area Fitter to the canvas.
Just press the Add Component button on any GameObject that has a Rect Transform and select Canvas Fitter.