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 - YukioT

Pages: [1]
1
I still have the same issu in v3.7.4. Any workaround?

Edit: tried using an invisible widget as the gameobject for the collider, and anchoring it to the label. The widget resizes correctly but the collider still doesn't.

Edit2: I wrote a little piece of script that calls a resize on the collider if it finds a difference, during Update(). Just attach it to the label that has a collider, works as-is.

Quote from: UpdateLabelCollider.cs
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. [RequireComponent(typeof(Collider), typeof(UILabel))]
  5. public class UpdateLabelCollider : MonoBehaviour
  6. {
  7.         private Collider _col;
  8.         private UILabel _lab;
  9.  
  10.         void OnEnable()
  11.         {
  12.                 _col= gameObject.GetComponent<Collider>();
  13.                 _lab= gameObject.GetComponent<UILabel>();
  14.         }
  15.        
  16.         void Update ()
  17.         {
  18.                 if(_lab.width != _col.bounds.size.x || _lab.height != _col.bounds.size.y)
  19.                         _lab.ResizeCollider();
  20.         }
  21. }

2
NGUI 3 Support / Re: Widgets' size and position going wild
« on: November 13, 2014, 08:57:44 AM »
Well apparently it has something to do with the layer on which my UI is. Is there a specific layer name/number I need to (not) set?

3
NGUI 3 Support / Re: Widgets' size and position going wild
« on: November 13, 2014, 05:16:29 AM »
Tried deactivating all the GameObjects child to the root, leaving only the camera. The borders of the UIRoot still show way lower than the UICamera and with disproportionate size. See attached picture.

4
NGUI 3 Support / Widgets' size and position going wild
« on: November 13, 2014, 05:02:28 AM »
Hello, I've got a weird issue with my UI.

Basically I have a window that fills most of my scene, using a UITexture as background. I've set its size un the GUI and constrained it with anchors to a panel that covers the whole UI Root. It worked great, until some unknown point when the size abruptly changed to 1151976x642844. The rest of my UI has also changed size or place, seemingly at total random: a panel covering the whole screen is now 1152152x2, and everything is at odd position I suppose to stay centered (like 572878.3;-876331.3;0 or -3233.406;-876225.4;0), but it just ends up kilometers away from my UI Camera.

I'm snooping around trying to do stuff but I'm kind of in the dark with this. Thanks in advance for any response.

5
NGUI 3 Documentation / Re: UISprite
« on: October 23, 2014, 07:10:39 AM »
Ok thanks, will do.

6
NGUI 3 Documentation / Re: UISprite
« on: October 21, 2014, 07:29:27 AM »
Hello, I have vertical rope sprite that I need to tile vertically, and scale it when changing its width. Is there a built-in way for this or should I extend UISprites?

Pages: [1]