Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Markov on October 11, 2013, 03:00:21 PM
-
http://www.youtube.com/watch?v=ECFzVpIYXwM&feature=youtu.be (http://www.youtube.com/watch?v=ECFzVpIYXwM&feature=youtu.be)
UIStretch doesn't work now. I tried to put it on the same GameObject with widget and on a parent of widget.
If I put UIStretch on parent - it multiplies scale of transform on every OnValidate event(i guess).
If I put it on the same object it doesn't do anything.
-
Remove the "container" property. Why did you set it? You set the parent's container to be the child. Uh.
Keep the stretch on the sprite. Don't put it on the "BG" object.
-
Oooops ;D
So, I have new question. UIStretch doesn't work correctly if the camera is in perspective mode.
It works fine if my background object right in the camera position, but if I move bg sprite position back - it won't cover all background space.
-
It's not meant to. Orthographic cameras have a fixed width and height. Perspective cameras have a varying width and height based on the depth.
-
So is there any way to use UIStretch in perspective camera?
-
You can't use a perspective camera's bounds, no.