public void gravityOff() { gravity = false; Physics.gravity = Vector2.zero; GameObject[] lights = GameObject.FindGameObjectsWithTag("Light"); foreach (GameObject l in lights) { CubeData c = l.GetComponent <CubeData>(); c.addRandomForce(); } }