public void LoadBodies(String json) { try { Body.DestroyAllBodies(); Body.bodies.Clear(); BodyList bl = JSONLoader.LoadStars(json); DataBody.LoadBodiesInGame(bl); GameObject tempParentGo = GameObject.Find("Bodies"); foreach (GameObject go in Body.bodies) { go.transform.SetParent(tempParentGo.transform); } } catch (Exception e) { Logger.Error("Exception while loading: " + e); } }