private void CreateProgressSection(IProgressPanel progress) { if (progress == null) { return; } if (ProgressPanelPrefab == null || MissionSectionTransform == null) { return; } GameObject obj = Instantiate(ProgressPanelPrefab); if (obj == null) { return; } obj.transform.SetParent(MissionSectionTransform, false); progressPanel = obj.GetComponent <CW_ProgressPanel>(); if (progressPanel == null) { return; } progressPanel.setPanel(progress); }
private void Awake() { instance = this; }