public static StationMgr BuildStationPoint() { GameObject go = GameObject.Find("Point/PointRoot"); if (go == null) { return(null); } Transform pointRootTrans = go.transform; if (pointRootTrans == null) { return(null); } StationMgr stationMgr = new StationMgr(); int stationCount = pointRootTrans.childCount; for (int i = 0; i < stationCount; ++i) { Transform stationTrans = pointRootTrans.GetChild(i); System.UInt16 stationIndex = (System.UInt16)System.Enum.Parse(typeof(StationType), stationTrans.gameObject.name); Station station = XXX(stationTrans); stationMgr.AddStation2Mgr(stationIndex, station); } go.transform.parent.gameObject.SetActive(false); return(stationMgr); }