Hi,
I have an application in IOS that loads Unity. Now, when Unity is loaded, I want it to be rendered in Safe Area (not just some part of UI BUT WHOLE UNITY - it’s a 3d Game). The game is already developed and I want it to render in the safe area only.
I have tried the safe area script and it just helps in bringing UI elements in the safe area. Is there any way I can render whole of the Unity in the safe area. Really need this as with Iphone 15 onwards, dynamic island is really hampering my game’s performance.
Do you have Unity embedded in a native iOS app? If so, you can set the view size of the Unity content accordingly. You still have to display a frame or something, not just leaving the borders black - most likely Apple will reject such apps as this is a clear sign of low quality and rather unexpected for users (they may regard it as a bug).
If you use Unity in the regular way (not embedded) then it will always render to fullscreen.
Since you’re having performance issues, reducing the view size is not the solution in this case. Profile the game on the device to learn what is affecting performance the most and then find ways to optimize that.
A common way on desktop to reduce the rendering load is to render at a lower resolution and then upscale the image. This is typicaly called “renderscale” and quite helpful if the game is GPU bound. I don’t know if this is a setting available for iOS but it should be if you use Universal Render Pipeline.
If you are using builtin render pipeline on mobile you’re leaving performance untapped.
You can have black borders equal to the safe area, so you don’t render stuff there, but Apple will most probably won’t accept it.
There is also no renderscale setting in iOS.
Also built-in is probably still faster on mobile that URP in many use cases, not sure if your game falls into one of them or not.
Finally: iPhone 15 was shown running Resident Evil 4 Remake, if you have performance issues on this device you’re probably doing something wrong.
Correcting myself here, I meant hampering game’s visuals and not performance.
Quoting from Unity as a library github read me file, Unity supports rendering only full screen. Can’t really find how to solve this.

Change your camera view settings so that things you want to be inside the safe areas are inside the safe areas.
Do your own masking and put black UI overlay on top to hide things in the safe area.
You might be able to do it with the camera viewport values as well. But you will have to probably calculate these based on the phone you are on. You may still need an additional camera to clear the full screen background each frame. Can be set to an earlier priority and set to render no layers.
Not sure if your question was performance related or not, but you can always render to a render texture then copy that to the screen inset. Then you can control the actual render resolution vs the screen resolution. I think now its easier to get AA and other features when rendering to the RT.