Author Topic: Adding Childrens to a off screen panel, make underneath widgets invisible  (Read 1382 times)

badawe

  • Jr. Member
  • **
  • Thank You
  • -Given: 8
  • -Receive: 7
  • Posts: 70
    • View Profile
So the title is pretty self explanatory, but is something like this:"


  1. Game Object (Controller)
  2.       - Content Game Object
  3.             - Scroll View (With Clip)
  4.                   - GRID
  5.                          - Prefabs
  6.                          - Prefabs
  7.                          - Prefabs
  8.                          - Prefabs
  9.  

So the Content Game Object, start deactivated and offscreen like position x are setted to Screen.width;
When they will become active, I Activate the Content Game Object using NGUITools.SetActive(Content Game Object,true); and them populate the GRID with my prefabs using the exactly same code NGUITools.AddChild() use, but on my own Method, because they are poolable objects. When everything is on Position, I tween the Content Game Object to the Vector3.zero position, but all childrens are invisible, but if I do anything with the childrens in Editor, like Move 1 pixel to side, Press MakePixelPerfect anything they show up properly.


Did you guys know if I'm doing something wrong?
« Last Edit: August 27, 2014, 10:07:20 AM by badawe »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
In what version of NGUI? You can try checking the "visible" checkbox on the UIPanel and making sure "static" isn't on.