Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: ngui on January 18, 2014, 02:29:31 AM
-
I have a heirarchy with a UIWidget at the root, a number of children UITextures, UISprites, UIWidgets, and UIScrollView/UIPanel under it.
I'm finding the 'Alpha' slider of the Widget and Panel to operate with some inconsistency. Some times all objects under the root can be faded, other times some elements (particularly the children under the UIScrollView/Panel) remain visible.
Same with the 'Soft Clipping' of the UIScrollView/UIPanel, I'm having trouble getting the children (UIWidgets w/ children UITextures) to clip.
How can I solve this? Is the setup wrong?
-
Clipping cannot be nested, so if you have extra panels in between of your widget and your scroll view, the clipping won't work.
-
I don't have any UIPanels between my UIScrollView/UIPanel and my UIWidget w/ UITexture. By nesting do you mean any nesting? or only UIPanels? Because I have had clipping in the past with nested elements.
-
Just panels. Clipping works only if you have shaders enabled (quality can't be set to 'fastest'), and the widget you're trying to clip must be using one of NGUI's shaders -- Unlit/Transparent Colored being the default.
-
I'll double check that I'm using NGUI's shaders (so not just any shader that supports transparencies/alpha will work?) and let you know whether that is the issue.
-
Just double checked the setup, there is no other UIPanel under the UIScrollView/UIPanel and the UISprite is using the sample 'Wooden Atlas' (Unlit/Transparent Colored shader). But soft clipping does not occur.
Any ideas?
-
Did you move the shaders from their default location in the Resources folder? You need NGUI's shaders to be present there in order for NGUI to be able to load them. "Unlit/Transparent Colored" gets replaced with "Unlit/Transparent Colored (SoftClip)" for soft clipping. You can also add them to the list of shaders that always get included (Edit -> Project Settings -> Graphics).
-
I'll double check their location tomorrow. Thank you.