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

Pages: [1]
1
If this is acceptable behavior, I'm going to start posting changes I've made to scripts that I believe others will find useful with the hope that these would be included in future builds.

The first one is quite simple. Just a boolean to turn off UIButton color tweening (on press, hover, etc).

In the UIButtonColor script I added:
  1. /// <summary>
  2.     /// Whether or not the button gets its colors tweened
  3.     /// </summary>
  4.     public bool shouldTweenColors = true;

and used it in the SetState method:
  1. if (mState != state && shouldTweenColors)

In the UIButtonColorEditor I added:
  1. NGUIEditorTools.DrawProperty("Tween Colors?", serializedObject, "tweenColors");

This way I can use my own color tweening or, if I don't want to have to set all colors to White when I don't need color tweening at all.

(If posts like this are not wanted or needed, please let me know)


2
  1. // If raycasts should be clipped by panels, we need to find a panel for each hit
  2.                         if (cam.clipRaycasts)
  3.                         {
  4.                                 RaycastHit[] hits = Physics.RaycastAll(ray, dist, mask);
Line 507

Is there an alternative way to do this? Maybe create a separate layer for each panel and have a unique raycasts (or layermasks) that only detect that layer.

This happens in UICamera,Update() when processing inputs and in UICamera.FixedUpdate().

  1. string input = Input.inputString;
Line 812

There is probably no way around using this. Lucky it only allocates a 14 or so Bytes. It does add up for longer levels though.

This is above my head but I saw in a thread 2.6.3 improved performance that you were looking to eliminate garbage collection. Not sure if this is helpful or not.

3
NGUI 3 Support / Re: UICenterOnChild missing "startIndex"...
« on: August 21, 2013, 11:59:28 PM »
Wow! That is embarrassing.  :-[

It was one of the first changes I made after buying NGUI. Sorry about that!

4
NGUI 3 Support / [CLOSED] UICenterOnChild missing "startIndex"...
« on: August 19, 2013, 02:09:17 AM »
I just upgraded from 2.6.1e to 2.6.4 and the removal of startIndex broke a few of my scrollable lists. These lists show racer rankings and I was setting the startIndex to be the player's ranking so they were in the center of the list to start.

What is the new way of accomplishing this?

(Great tool BTW. Worth every penny)

Pages: [1]