Is there any way to change Preview resolution by code?

Hi there! I want to know if there is any chance to change by code the preview resolution. I mean, in the tab Game there are different resolutions (Free aspect, ect.) and for example in web or pc you can change it to an specific resolution meanwhile in ios or android you have some devices resolutions.

Thanks!

Check out the Screen.SetResolution function here.

Thanks Ben but its not that what im trying to find, i want to change the editor preview resolution, where you can see “free aspect” and another resolutions in the Game Tab