Author Topic: UIStretch, UIClip relation  (Read 3341 times)

rain

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 79
    • View Profile
UIStretch, UIClip relation
« on: October 07, 2012, 05:19:08 PM »
Hi!

I strech my UI for different resolutions by putting a UIStretch on the UI Root itself and there weren't any problems so far, but i noticed that it messed up the elements which used clipping. How is UIStretch related to clipping?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIStretch, UIClip relation
« Reply #1 on: October 07, 2012, 07:39:03 PM »
UIStretch should only be used on widgets, never on the UIRoot or any other game objects. UIRoot changes its own scale. Placing UIStretch doesn't make any sense as the two conflict in what they're doing.

rain

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 79
    • View Profile
Re: UIStretch, UIClip relation
« Reply #2 on: October 08, 2012, 01:04:02 AM »
UIStretch did its job well so far, this is the only problem i encountered with this method.
So now i have to re-do the whole GUI?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIStretch, UIClip relation
« Reply #3 on: October 08, 2012, 04:01:15 AM »
None of the examples use UIStretch on the root. Yes, you have to reconsider how you're doing your UI.

rain

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 79
    • View Profile
Re: UIStretch, UIClip relation
« Reply #4 on: October 08, 2012, 04:31:53 AM »
I guess you should make a warning for this so others won't make this mistake. Thanks :D

rain

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 79
    • View Profile
Re: UIStretch, UIClip relation
« Reply #5 on: October 08, 2012, 04:40:49 AM »
One more question: If I can't stretch the UI root itself, how do i stretch my UI then to have look the same on any resolution?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIStretch, UIClip relation
« Reply #6 on: October 08, 2012, 08:09:28 AM »
Setting the root to "manual" is all you should do. Stretching the width and height differently results in skewed UI, which looks hella ugly.