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

Pages: [1]
1
NGUI 3 Support / Re: UILabel text not shrinking after anchor updated
« on: August 20, 2014, 03:17:46 PM »
Well, I need to ignore the disabled objects, it's one of the main purposes of this component, to make the enabled game objects fill up the entire area   :)

So this is a editor only problem, interesting.

2
NGUI 3 Support / UILabel text not shrinking after anchor updated
« on: August 19, 2014, 05:01:57 PM »
Hello,

I've updated to 3.7.0 from 3.6.5 and I noticed a bug that I couldn't pinpoint the origin, I have a UIDistribute component that basically sets the anchors to uniformly distribute the children in a container, but after the update in some cases the UILabel contents (set to ShrinkContent) was leaking outside the rect area.



I managed to isolate the problem in a isolated environment, the .unitypackage is attached, just import into NGUI project, open the scene and click the button a couple times.

Seems that UILabel didn't detect the size change and shouldBeProcessed isn't being set.

Am I doing something wrong? There's a better way to do that?

3
NGUI 3 Support / Re: RealTime problem
« on: June 29, 2014, 06:58:44 PM »
Arguably it should just use http://docs.unity3d.com/ScriptReference/Time-unscaledTime.html now.

The problem is that it's Unity 4.5 only, and NGUI supports 4.3+

4
NGUI 3 Support / RealTime problem
« on: June 28, 2014, 08:07:13 PM »
Hi,

Yesterday I faced one Unity bug while trying to play a UITweener on the OnEnable() of one of my scripts, for some reason it delayed a several seconds before starting, I found out it was related to this:

http://forum.unity3d.com/threads/realtimesincestartup-is-not-0-in-first-awake-call.205773/

Basically the Time.realtimeSinceStartup isn't updated yet in the Awake() / OnEnable() calls when the scene is entering play mode in editor.

In order to prevent this I've made some workarounds in RealTime class, not sure if it's the best option (also not well tested):

  1.         static void Spawn ()
  2.         {
  3.                 GameObject go = new GameObject("_RealTime");
  4.                 DontDestroyOnLoad(go);
  5.                 mInst = go.AddComponent<RealTime>();
  6.                 mInst.mRealTime = Time.realtimeSinceStartup;
  7.                 mInst.mInitialRealTime = mInst.mRealTime;
  8.         }
  9.  
  10.         void Update ()
  11.         {
  12.                 float rt = Time.realtimeSinceStartup;
  13.  
  14.                 if (rt < mRealTime) rt += mInitialRealTime;
  15.  
  16.                 mRealDelta = Mathf.Clamp01(rt - mRealTime);
  17.                 mRealTime = rt;
  18.         }
  19.  

5
NGUI 3 Support / 2D colliders and RigidBodies
« on: June 08, 2014, 11:36:42 PM »
Hello,

Is the RigidBodies still needed on UIPanel if we're only using 2D Colliders? Shouldn't it add a RigidBody2D instead? Or differently from 3D colliders the presence or not of a rigid body has any performance difference?

Thanks

Pages: [1]