Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
  • Home /
avatar image
0
Question by Chesley · Aug 26, 2012 at 07:11 PM · guidrawtexturescreen.width

Screen.width + Draw Texture not screen width

i use GUI.DrawTexture and Screen.width/height to fill the screen with a texture, but Screen.width gives me Screen.width - 1.

even when i write Screen.width + 1 in code i can't get it to fill up the last vertical row of pixels.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Chesley · Aug 29, 2012 at 12:10 PM

i found out that this is an editor bug

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ScroodgeM · Aug 29, 2012 at 09:13 PM 0
Share

i'm not sure in it... still want to know way to reproduce that...

avatar image
0

Answer by ScroodgeM · Aug 26, 2012 at 07:48 PM

may be your texture aspect ration is different a little to screen aspect ratio and it fits vertically but not enough for 1 pixel to fit horizontally?

Comment
Add comment · Show 17 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Chesley · Aug 26, 2012 at 07:50 PM 0
Share

but i stretch it with: Scale$$anonymous$$ode.StretchToFill, would that problem be solved? or is stretching still limited?

avatar image ScroodgeM · Aug 26, 2012 at 07:53 PM 0
Share

show whole line with GUI.DrawTexture, and a pic if you can

avatar image Chesley · Aug 26, 2012 at 08:00 PM 0
Share

GUI.DrawTexture(Rect(0,0,Screen.width,Screen.height), WhiteTexture, Scale$$anonymous$$ode.StretchToFill, true);

line

pic is just a 256x256 white square

avatar image ScroodgeM · Aug 26, 2012 at 08:05 PM 0
Share

r u sure your texture doesn't have alpha value on edge? and on left edge too?

avatar image Chesley · Aug 26, 2012 at 08:10 PM 0
Share

yes im very very sure, also i tested it by doing Rect(0,0,2000,2000) and it STILL leaved the line

Show more comments
avatar image
0

Answer by hdgam3r · Aug 26, 2012 at 08:35 PM

Check your texture´s import settings on the inspector:

  • Make sure that the Texture Type is set to: GUI

  • Make sure that the Max Size (default 1024, I think) is enough to fill your screen size.

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Chesley · Aug 26, 2012 at 08:37 PM 0
Share

already tried that. didn't work. still thanks for the response

avatar image hdgam3r · Aug 26, 2012 at 08:42 PM 0
Share

Just to be sure, is your Game window set to a specific resolution ins$$anonymous$$d of Free Aspect?

avatar image Chesley · Aug 26, 2012 at 08:45 PM 0
Share

yes it is

avatar image ScroodgeM · Aug 26, 2012 at 08:51 PM 0
Share

try to resize game view then 8))

avatar image Chesley · Aug 26, 2012 at 08:52 PM 0
Share

doesn't work either

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

Limit on GUI Components? 0 Answers

How To Make Ammo & Realod for Gun & Spark for Gun ? 0 Answers

Drawing a GUI.DrawTexture call above GUI.Button in seperate scripts 0 Answers

GUI.DrawTexture isn't centred. Help? 1 Answer


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