- Home /
Screen.width /height not working as intended
When i try to use Screen.width / height, it returns the width of the scene view, and not the game view. Logically, i need the values for the game view. Can anyone help?
Edit: I figured it out. I called Screen.width in onDrawGizmos(), which takes the scene view and not the game view for some weird reason
Please, EDIT YOUR QUESTION and provide more context.
Where and how do you call this? Provide your actual code please.
Answer by dorusoftware · Jul 20, 2021 at 01:43 PM
In the game view select one of the preset resolution / or add your own. at left where Free Aspect is selected
Your answer
Follow this Question
Related Questions
Can I customize the resolution window that appears at the start of my executable? 2 Answers
determine how much space is left on screen 1 Answer
Splitting the game view - part camera, part opaque navigational panel at runtime 1 Answer
How do I set an Android applications resolution? 4 Answers
How to draw a small circle on scene and moving it wherever mouse cursor moves 2 Answers