Esempio n. 1
0
 /// <summary>
 /// Toggles the visibility of a group of GameObjects in the viewport.
 /// </summary>
 public void VGOToggleGroupVisibility(int group, bool isVisible)
 {
     if (vgos == null)
     {
         return;
     }
     foreach (KeyValuePair <int, GameObjectAnimator> keyValue in vgos)
     {
         GameObjectAnimator go = keyValue.Value;
         if (go != null && go.group == group)
         {
             go.visible = isVisible;
             GameObject o = go.gameObject;
             if (o.activeSelf != isVisible)
             {
                 o.SetActive(isVisible);
                 go.UpdateVisibility(true);
                 go.UpdateTransformAndVisibility();
             }
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Toggles the visibility of a group of GameObjects in the viewport.
 /// </summary>
 public void VGOToggleGroupVisibility(int group, bool isVisible)
 {
     if (vgos == null)
     {
         return;
     }
     CheckVGOsArrayDirty();
     for (int k = 0; k < vgosCount; k++)
     {
         GameObjectAnimator go = vgos[k];
         if (go.group == group)
         {
             go.visible = isVisible;
             GameObject o = go.gameObject;
             if (o.activeSelf != isVisible)
             {
                 o.SetActive(isVisible);
                 go.UpdateVisibility(true);
                 go.UpdateTransformAndVisibility();
             }
         }
     }
 }