Change resolution runtime

From the documentation, I found out how to change the resolution.
Unfortunately, it’s not working, can someone check my code to see what’s wrong?
In console, i can see much bigger resolution then it’s on PlayCanvas settings

1 Like

Hi @Dava,

I think you should be using the following method, can you try it setting your resolution to fixed and set your desired width/height:

1 Like

If you mean in Rendering settings, it’s already fixed

No, I mean use the method in code to set the app resolution Width/Height.

I did , and it’s weird
This is output of my console, i have in settings full HD resolution, and i want to set HD from code

As per @Leonidas request, this is all information what I am doing

I have setting panel in Runtime

Button leads to even that call this function


Even tho I change my resolution to full HD, in the console this is what I get

this is my render settings in Project