Example #1
0
    public static void SetActiveChildren(GameObject go, bool state)
    {
        Transform transform = go.get_transform();

        if (state)
        {
            int i          = 0;
            int childCount = transform.get_childCount();
            while (i < childCount)
            {
                Transform child = transform.GetChild(i);
                UGUITools.Activate(child, true);
                i++;
            }
        }
        else
        {
            int j           = 0;
            int childCount2 = transform.get_childCount();
            while (j < childCount2)
            {
                Transform child2 = transform.GetChild(j);
                UGUITools.Deactivate(child2);
                j++;
            }
        }
    }
Example #2
0
 private static void Activate(Transform t, bool compatibilityMode)
 {
     UGUITools.SetActiveSelf(t.get_gameObject(), true);
     if (compatibilityMode)
     {
         int i          = 0;
         int childCount = t.get_childCount();
         while (i < childCount)
         {
             Transform child = t.GetChild(i);
             if (child.get_gameObject().get_activeSelf())
             {
                 return;
             }
             i++;
         }
         int j           = 0;
         int childCount2 = t.get_childCount();
         while (j < childCount2)
         {
             Transform child2 = t.GetChild(j);
             UGUITools.Activate(child2, true);
             j++;
         }
     }
 }