Hello !
So until now I used NGUITools.SetActive without any problem, everything worked perfectly, but I just encountered a problem which I cannot figure out...
I have a menu Panel which I activate on some event, a scrollView in it, and in this scroll view, two game objects for two sections.
The second one contains a "title" with a UISlicedSprite and a UILabel, and when I try to desactivate this one, there is nothing to do, it just keeps being here. I guess I call some functions in the wrong order, but I cannot find a solution.
Here is the simplified script attached to the parent panel:
void OnEnable()
{
NGUITools.SetActive(gameObject, true); //Had to do this because I need the children to be activated for the next functions
RemoveAllGames();
LoadGames();
}
void LoadGames()
{
//Here I insert a lot of objects in the first section of the scrollView
//And now I handle the second section:
if(trueCondition)
{
NGUITools.SetActive(SecondSectionOfTheScrollView, false);
}
}
And after that the second section stays active, no matter what...
Maybe it is because I call it from a "OnEnable" function, but I can't find another solution (because I need this view to be reloaded each time the panel becomes active)... Any idea?