void OnDestroy() { _MissionDes = null; _MissionCondition = null; _RewardCoin = null; _RewardStone = null; _MissionList.Clear(); _RewardList.Clear(); _MissionSystemCell = null; }
void CreateMissionCell(int length) { Object prefab = PrefabLoader.loadFromPack("LS/pbLSMissionCell"); if (prefab != null) { for (int i = 0; i < length; i++) { GameObject obj = Instantiate(prefab) as GameObject; obj.name = (i + 1).ToString(); RED.AddChild(obj, _Missionlistroot.gameObject); MissionSystemCell mm = obj.GetComponent <MissionSystemCell> (); _MissionList.Add(mm); } } _Missionlistroot.Reposition(); }