Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: badawe on August 27, 2014, 09:47:42 AM

Title: Adding Childrens to a off screen panel, make underneath widgets invisible
Post by: badawe on August 27, 2014, 09:47:42 AM
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?
Title: Re: Adding Childrens to a off screen panel, make underneath widgets invisible
Post by: ArenMook on August 28, 2014, 08:27:40 PM
In what version of NGUI? You can try checking the "visible" checkbox on the UIPanel and making sure "static" isn't on.