[Edited] Sorry so long on 1st pass, tried to shorten it.
My app has multiple menus; 1st determines the contents of the 2nd.
- The 1st menu makes a selection, then fades out and works every time.
- The selection builds content of the 2nd menu adding "button" Prefabs to a uigrid. Buttons are created (per hierarchy), but don't show on initial display.
- I'm using TweenAlpha to fade menus in and out. This works correctly on everything except the grid with the buttons.
- The first time the 2nd menu fades in, only the background (UISprite) shows, NO buttons.
- If I click the UIScrollBar, on this initial use, the buttons suddenly appear (no fade, just show up as if they were refreshed).
- The second time the menu fades in, it all works.
- NOTE: When running the code, I can watch panels enable, buttons created, and Alpha change acorrectly. But why can't I see the buttons?
I've attached screen shots of the post-Fade In with no buttons, and the button shown after clicking the Scroll Bar.
Can anyone point me in the right direction?
Question: If I''m using the NGUI TweenAlpha script, and "Play" it forward. Shouldn't it fade all the child panels under it?
Project Hierarchy (misbehaving menu)* uipanelTrainingSet Transform_Position_Z = 0 - Background Transform_Position_Z = 0 <UISprite>
- uidragTrainingSet Transform_Position_Z = -1 <UIPanel>, <UIDraggable Panel>, <TweenAlpha>
- uigridTrainingSet Transform_Position_Z = 0 <UIGrid>
- Button(s) Transform_Position_Z = 0 <Box Collider>, <UIDrag Panel Contents>, <UIButton Sound>, <Proprietary script>
- uispriteButton
Transform_Position_Z = 0 <UISprite>
- Name
Transform_Position_Z = -1 <UILabel>
- uiscrollTrainingSet <UIPanel>, <TweenAlpha>
- uispriteButton
Transform_Position_Z = -1 <UISprite>
- Background
Transform_Position_Z = 0 <UITiled Sprite>
- Foreground
Transform_Position_Z = 0 <UITiled Sprite>