Beispiel #1
0
 public static void ChangeLayerWithChild(GameObject rootObj, int nLayer)
 {
     if (rootObj == null)
     {
         return;
     }
     rootObj.set_layer(nLayer);
     for (int i = 0; i < rootObj.get_transform().get_childCount(); i++)
     {
         NgObject.ChangeLayerWithChild(rootObj.get_transform().GetChild(i).get_gameObject(), nLayer);
     }
 }
Beispiel #2
0
 public static void ChangeLayerWithChild(GameObject rootObj, int nLayer)
 {
     if (rootObj == null)
     {
         return;
     }
     rootObj.layer = nLayer;
     for (int i = 0; i < rootObj.transform.childCount; i++)
     {
         NgObject.ChangeLayerWithChild(rootObj.transform.GetChild(i).gameObject, nLayer);
     }
 }