• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges

Screen.width

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

LuongCongDan answered

When are Screen.width and Screen.height updated after changing the Screen.orientation value?

Mar 6, '23 screen·orientation·screen.width·screen.height·screen.orientation

1 Reply

0 Votes

avatar image

LuongCongDan answered

Do screen.width and screen.height get updated depending on screen orientation on Android? Wiki

Mar 6, '23 android·orientation·screen.width·screen.height

2 Replies

4 Votes

avatar image

Bill_G241 commented

Touchscreen input: Moving the player using screen.width & screen.height

Nov 28, '20 input·screen.width·screen.height

1 Reply

0 Votes

avatar image

HombreCubo asked

When compiling the game and testing it on any smartphone, the screen narrows.

Jul 12, '20 in Help Room

0 Replies

0 Votes

avatar image

$$anonymous$$ commented

How to set screen boundaries on a moving camera

Jan 9, '20 screen·screentoworldpoint·screen.width·screen.height

1 Reply

0 Votes

avatar image

Mlorenz821 edited

Difference between Screen.height / width and EditorWindow.position.width / height

Nov 11, '19 editor-scripting·editorwindow·screen.width·screen.height

0 Replies

0 Votes

avatar image

FutureLights asked

Scale game vertically only

Sep 23, '19 camera·2d game·scale·screen.width

0 Replies

0 Votes

avatar image

$$anonymous$$ commented

I know how to turn car left and right, but I dont know how to reverse. please help. thanks.

Apr 29, '19 car·reverse·touchcount·screen.width·gettouch

0 Replies

0 Votes

avatar image

H3ll0VR asked

Screen.width/Screen.height not working with multiple resolutions

Jan 23, '19 ui·screen resolution·screen size·screen.width·screen.height

0 Replies

0 Votes

avatar image

VahanSardaryan commented

how can i divide screen to x & y axes for different resolutions

Jan 15, '19 screen resolution·screen size·screen.width·screen.height

1 Reply

0 Votes

avatar image

Reverend-Speed asked

Why is my orthographic camera not resizing according to resolution / aspect?

Jan 1, '19 aspect-ratio·localscale·orthographic camera·screen.width·screen.height

0 Replies

0 Votes

avatar image

Bunny83 commented

Screen height and width confusion

Feb 25, '18 screen·positioning·box·screen.width·screen.height

1 Reply

0 Votes

avatar image

Bunny83 commented

Can't work with screen.width / height

Aug 2, '17 screen·screen.width·screen.height

3 Replies

0 Votes

avatar image

RobertWebb published

Screen.width & height not updated after screen rotation

Mar 14, '17 android·orientation·screen.width·galaxy·screen.height

1 Reply

0 Votes

avatar image

Rajeesh_AR answered

Getting Device Screen Height and width in inches

Aug 19, '16 screen·screen size·screen.width·screen.height

2 Replies

1 Votes

avatar image

kashif789us asked

Capture screenshot of a Particular Area on screen

Jan 18, '16 in Help Room

0 Replies

0 Votes

avatar image

AngryTilde edited

Moving GameObject with Mouse problem

Nov 11, '15 in Help Room

1 Reply

0 Votes

avatar image

pako answered

Divide screen in 3 equal parts/ Screen.width/3 + use of GetMouseButtonDown(0)

May 23, '15 c#·screen.width

1 Reply

0 Votes

avatar image

BlazingRiver asked

Does Screen.width Recognise the iPhone 6 Plus Downscaled Resolution, or the Rendered One?

Mar 31, '15 ios·resolution·screen.width

0 Replies

0 Votes

avatar image

Eric5h5 commented

Spawning according to screen width

Feb 27, '15 instantiate·array·spawning·screen.width

3 Replies

0 Votes

avatar image

xxBarginsxx commented

Can you tell unity to resize the Game window by a button press?

Feb 15, '15 game·screen·resize·screen.width·screen.height

2 Replies

1 Votes

avatar image

Broken Crayon Games commented

Screen.width Not Working

Jan 5, '15 screen.width·horizontal-slider

2 Replies

0 Votes

avatar image

AlucardJay edited

Detect touch in screen at different resolutions

Nov 3, '14 camera·raycast·screen·screen.width

2 Replies

0 Votes

avatar image

Voltar edited

Screen.width + Draw Texture not screen width

Aug 12, '14 gui·drawtexture·screen.width

3 Replies

0 Votes

avatar image

Stormizin commented

GUI.Draw Texture Positioning

Jul 25, '14 screen·drawtexture·screen.width

1 Reply

0 Votes

avatar image

JayOhhh commented

Scaling GUIText for all resolutions.

Jun 13, '14 screen.width·screen.height

0 Replies

0 Votes

avatar image

diogm published

Positioning across various resolutions

May 30, '14 objects·positioning·screen.width·screen.height

0 Replies

0 Votes

avatar image

vvkkumar06 asked

How to resize a normal image then apply as a texture for GUI.Box()?

May 27, '14 texture2d·resize·screen.width·screen.height·guibox

0 Replies

0 Votes

avatar image

maddFrogg edited

Keeping screen width and scaling screen height for different screen resolutions

Apr 25, '14 camera·screen·screen.width

2 Replies

0 Votes

avatar image

MattDahEpic edited

Only using related functions, yet still being told that I can't use non GUI functions in OnGUI (Don't call OnGUI)

Apr 25, '14 ongui·guilayout·screen.width·screen.height

1 Reply

0 Votes

  • 1
  • 2
  • ›

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Related Topics

screen.height screen android screen resolution camera screen size orientation resolution c# positioning vector3 scale texture2d landscape aspect-ratio gui.box resize iphone 2d touch input guilayout transform.position drawtexture touches


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges