Author Topic: PixelPerfect style - UITexture and UIStretch  (Read 2384 times)

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
PixelPerfect style - UITexture and UIStretch
« on: May 23, 2013, 04:49:53 AM »
Hello!

I have the following settings:
UIRoot, style = PixelPerfect
UITexture (background) with UIStretch (style = Both)
Texture (attach) size = 1000x700
Game size in editor = 960x640

Will be able to use the full screen (web)
  1. Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, true);

As seen in the screenshot (attach) to the left of the background is a line. I understand this is because of the wrong size textures for UIStretch and how to fix it?

Advise where I can read more about the difference between a PixelPerfect and FixedSize, as well as the desired resolution textures for these styles (developing for different resolutions).

Thanks!
« Last Edit: May 23, 2013, 04:56:00 AM by broken »

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: PixelPerfect style - UITexture and UIStretch
« Reply #1 on: May 23, 2013, 05:07:11 AM »
Before that UITexture was in the UICamera game object, now transferred it to the Anchor (Center) and everything was fine. Apparently without Anchor UIStretch what makes something a offset texture. Maybe I'm still doing something wrong?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: PixelPerfect style - UITexture and UIStretch
« Reply #2 on: May 23, 2013, 11:26:21 AM »
I am confused by what you're trying to do, but everything must be underneath some anchor -- center, or otherwise -- and the scales of all objects leading up to your widgets must be (1, 1, 1), except UIRoot.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: PixelPerfect style - UITexture and UIStretch
« Reply #3 on: May 23, 2013, 01:04:17 PM »
Why confused? I just wanted to make a stretchable background with UITexture and UIStretch.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: PixelPerfect style - UITexture and UIStretch
« Reply #4 on: May 23, 2013, 09:17:02 PM »
What version of NGUI are you using here?