What am I trying to achieve?
I'm trying to make a high-res UI for a game with pixel art, hence why I need it! To scale things in the world, I have a script that sets the zoom of the camera based on the ratio between the screen size and the "native" resolution of the game (then I round the value), so I have an integer scaling (I have to disable the stretch mode on the Project Settings): https://i.imgur.com/q8KH9tm.gif
If I just scale the UI (as I do in my game with pixel art UI), its content, especially the text, won't look good. For that, I need 2d/expand stretch mode, which works perfectly. The issue here is that if I set the stretch mode to 2d/expand in the ProjectSettings, the pixel art will get ugly: https://i.imgur.com/cN2OhTe.gif
So basically, I need to keep the main stretch mode disabled whilst setting it to 2d/expand in my custom viewport. Is it possible?