setColliderStateInChildren() public static method

public static setColliderStateInChildren ( GameObject rootObject, bool newValue ) : void
rootObject UnityEngine.GameObject
newValue bool
return void
 public void goOffRails()
 {
     _isOffRails = true;
     if (!offRailsInitiliazed) // run once on each offRails activation
     {
         if (rbody == null)
         {
             setupRigidBody();
         }
         if (rbody == null)
         {
             return;
         }
         rbody.isKinematic   = false;
         rbody.velocity      = currentVelocity;
         offRailsInitiliazed = true;
         CraftLoader.setColliderStateInChildren(ghost, true);
         if (offRailsObject == null)
         {
             offRailsObject = ghost.AddComponent <OffRailsObject>();
         }
         else
         {
             offRailsObject.enabled = true;
         }
     }
 }
 public void goOnRails()
 {
     _isOffRails         = false;
     offRailsInitiliazed = false;
     Destroy(rbody);
     CraftLoader.setColliderStateInChildren(ghost, false);
     if (offRailsObject != null)
     {
         offRailsObject.enabled = false;
     }
 }