I have a Canvas with UI elements on it. In a script I toggle between 1080p and 4k resolution depending on the video being played on the canvas with video player
but it doesnt seem to effect the Canvas rect transform until i manually change the circled resolution. I thought setResolution and cam.aspect WAS supposed to be doing that anyway? This is making my script not function correctly when the user changes the resolution of the player as I’m calling the cam.ScreenToWorldPoint to transform some ui position keys
If I manually change the circled aspect ratio at runtime in the editor i get the effect i want, but i want to know how to do this with script. Thanks.
I apologise as I said this forum is for 2D feature support, it’s actually general scripting. I’ve been moderating a lot of 2D forum posts this morning redirecting them to the correct forums such as scripting and for some reason thought your post was in the 2D forum.
The post is fine here, just wanted to note for the future that there’s a UI forum.
IIRC, canvas resolution and screen resolution are two different things. Canvas controls its own resolution, which I guess is why it says “Some values driven by Canvas”. Maybe try changing this: