public void CreateNewPanel(int id, string name, string date) { if (!sceneids.Contains(id)) { ScenarioPanel panel = Instantiate(scenarioPanel, scenarioTransform.transform).GetComponent <ScenarioPanel>(); panel.Initialize(id, name, date); sceneids.Add(id); } }
public void CreateNewPanel(int id, string name, string date) { //Add panel if it doesnt contain in the list if (!sceneids.Contains(id)) { //Instantiate the panel and initialize with data ScenarioPanel panel = Instantiate(scenarioPanel, scenarioTransform.transform).GetComponent <ScenarioPanel>(); panel.Initialize(id, name, date); sceneids.Add(id); EnablePanel(1); } }