Question by
Willard720 · Apr 28, 2018 at 02:33 PM ·
c#unity 5camerascreenaspect-ratio
Set screen resolution not working with C#
One would think this would be really simple, but it's not working. I want to change the resolution of the game during runtime. My code:
public void Start() => Screen.SetResolution(Screen.resolutions[6], Screen.resolutions[6].height, false);
This is attached to the camera component. I figured to use the built in resolutions just incase it wouldn't let me set it to any arbitrary value, but nope.
The width for the seventh element is supposed to be 800, but it still stays at 1280. I also haven't been able to change the screen orientation, or camera aspect ratio.
Comment
Your answer
Follow this Question
Related Questions
how to make forward relative to the view of the camera 0 Answers
Navigation in VR Mode?!! 0 Answers
uNet hitboxes and movement. 0 Answers
Keys "A" and "D" to TURN and not TURN and RUN 0 Answers
Need Help With Having Player look at an object while stationary. 0 Answers