Getting the Screen (Window) Resolution

EDIT: You can simply get camera.pixelWidth/Height :man_facepalming:
I guess this might still be interesting tho:

In case someone needs this, heres how you can get the window resolution:

And heres the Node-Paste

AN2X227bOBCGX8XgtWiQFA+igdw0SRfFbrsFkvhmExg8jAJ1FTHQoYnXyZP1Yh9pX2HpQxJ3bXjVNCmMwr4QKZn655ufM/Q/X/6eoc+m7ACN/pihvCvLD+YqDtBhqJp2clYV7fS4uiwqGINrQ52iBHWFjw+wVAIXhGJnMou5EA5nPlc49Up4rYRSOY8PX4emaItQodEM3aIR5owMSYKmaEQ1G5L7BFXBw9m7oyYqQOgiQXkZblbji+Xd8Vxgs1DYzQX9bj9FMeOl7BkqolJTOXh3hEbzBZu2LqrL1W20FsJwFUMyWJ88DDW8D74rIRmMoW6i2IOocf5JBodd2XY1HFTQtbUpk8HHzpaF+xWmp+FPqA6qSOxudo5uz+O74w/O0fTx6q/l1T26v7hPvg2uymUqFUkx1URgbjTHlkrAgilDlNOOM7YTLvm50NJHtPR/0P4C7WRs6sLYEh5xGq+Ic8ZGfpREnFTizGQ5NiQaWGcWbJru9irJfgTQk2nTwtXwZDGZDK4aF+qysE/weF94VikjnJBUpxxIpu9M3I9WgseQyxxz7j02Ofc4zZSU0mmwnGzSfCC57tXDeKs2T2z7LLzJdkF0wRZTtsWtydr35UGjeZx7lZ8V1e/S9SaEEkz1ssJO6/iK/ZP11pTNc3Vt+nzN3kdgu8vhZPJbuJxMlhEsF38YjUP0/YP7c8i1NTrHijCGuSYaW2sMTqlNpfGZt7Clskj5UFhwKje8r70EoyjDjqQGcxACaxvrlmCWEQVKaJfekVfZFTu4rAp8JBOuJyedjWly85AmW/rYtqld7a5PxJsUmWArimrzJAExK9LTLNYhKTHPvcNWKIsZd9wqxw1L4W5emJw2hOcgsGUQ6xfVFMd+wLBmRDtDaOaYeyXaL2/eZRWJORoXcHMd6vY0nLgaoPoYiqrdmqpdeekDcWdt3+LuPr14kZg+Z6B9Ssw+noZezxp9ts1Oa1DOn++NPn8+9skbm5k5/gyR+tm1N+3TOVUZS6SzBCthY1jORKhGx74iJAgvfCb0lv0mHuvglm7yNYJ+/eq/oC6i+n8B

2 Likes

Just for the desktop view, correct? No special considerations for VR/not VR?

Well it takes the viewport and screenpoint of the camera, so if you have a stereoscopic camera, and set that camera to render to the left or right eye it will give you the screen resolution of the screen it renders to.
Im not too familiar with how VRChat’s rendering works. There might actually be two cameras at play that render non-stereoscopically for each eye. I think in most cases this will also work for VR but not sure.