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

Pages: [1]
1
NGUI 3 Support / Scroll Bar frequently disappears during color tween
« on: September 29, 2015, 05:26:13 PM »
I have a ScrollView with a vertical Scroll Bar.  The scrollbar background object (to which the UIScrollBar script is attached) has a BoxCollider and a UIButton with NO Tween Target and Transition=0.  The scrollbar foreground object is a child of the background object and very similar to it with a BoxCollider and a UIButton with NO Tween Target and Transition=0 and a green square set in the UISprite.

At runtime, when I move the mouse left and right over the foreground button it fades in an out as I move over it.  If I do this enough, it's not hard to make the button disappear altogether and it will not reappear.

What I discovered by running in the editor is that at runtime TweenColor scripts are being added to the foreground and background objects even though Tween Target is set to None and Transition=0 for both.  I also noticed that when the button disappears, the Color Tint of the UISprite of the background object has an Alpha value of 0.  The value of TweenColor.To.alpha=0 for both background and foreground objects.  If I reset the Alpha of Color Tint of the background object to 255, the foreground button reappears until the next time I move over it enough to make the problem reoccur.

So I have 2 questions:
1. Why is the Alpha of the To color of this magically appearing TweenColor being changed to 0 at runtime (when created, it's 255)?
2. How can I prevent these TweenColor scripts from being added to my scrollbar objects since I don't want any tweening?

Thanks for any guidance for this NGUI nubie.

2
NGUI 3 Documentation / Re: UI2DSprite
« on: September 17, 2015, 06:52:39 PM »
Hello!

We're experiencing a clipping problem with UI2DSprite.

We have a file list viewer created with NGUI that uses a UIPanel/UIScrollView to which we add our own "FileIconTemplate" prefabs (1 per file) at runtime.  Each "FileIconTemplate" contains a couple of UISprite elements to create a nice background, a UILabel that contains the filename text, and a UI2DSprite that contains a graphic thumbnail of the contents of the file.  All of the previously mentioned elements are children of a UISprite with a UIDragScrollView.cs attached to it that serves as the root of the prefab.

When we put enough of our FileIconTemplate items in the ScrollView and scroll up and down (Movement=Vertical), all of the sub-elements of the template get clipped properly except the UI2DSprite elements.  The UI2DSprite elements appear in front of the surrounding UI components (outside the ScrollView) until they are moved completely outside the ScrollView volume and are culled.

Is there some sort of setting, switch or depth value that we might not be setting properly or is boundry clipping not possible with UI2DSprite elements?

We're using Unity 5.1.0f3 and NGUI 3.7.7

Any insight would be greatly appreciated!

Pages: [1]