Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: laurentl on April 11, 2013, 02:05:33 AM

Title: stretch - offset in pixel
Post by: laurentl on April 11, 2013, 02:05:33 AM
stretch offset uses relative size in fraction of stretched size.
I want to stretch between two side buttons which are constant in pixel size so that relative size business doesn't work.
How do I do that ?

(it's like stretching between two anchors)
Title: Re: stretch - offset in pixel
Post by: ArenMook on April 11, 2013, 09:20:41 PM
Write a custom script.
Title: Re: stretch - offset in pixel
Post by: laurentl on April 12, 2013, 01:07:16 AM
Aren you smartass  ;D

I want details.
Title: Re: stretch - offset in pixel
Post by: ArenMook on April 12, 2013, 06:40:28 AM
No, really :P

UIStretch won't work for what you are trying to do. You need to write a custom script that will calculate the distance between A and B, then position the object in the middle and set the scale to be that value (assuming central pivot).