Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - mitay-walle

Pages: [1]
NGUI 3 Documentation / Re: UITexture
« on: June 19, 2015, 02:28:58 AM »
Hello! I'm using UITexture with runtime-imported texture, for some reason it has wrong local scale after import, and I can't change it through code.
In a little different situation, Anchors helped, but this is not that case.

What I've tried to do:

            image.mainTexture = texture;

            image.transform.localScale =;  // no effect
            transform.localScale =;  // no effect
            //image.height = NGUIMath.AdjustByDPI(.01f); //this changes not the local scale, but pixel size in widget
            //image.width = NGUIMath.AdjustByDPI(.01f);
            //NGUIMath.MakePixelPerfect(image.uvRect,600,300); // no effect
            //image.transform.localScale =;  // no effect
            transform.localScale =;  // no effect

My main question: How can I change local scale (in transform) of UITexture?

Pages: [1]