private void fillSceneDropdown() { TMP_Dropdown m_Dropdown; //Fetch the Dropdown GameObject the script is attached to m_Dropdown = GameObject.Find(SceneDropdownName).GetComponent <TMP_Dropdown>(); List <string> options = videoData.getScenesOptions(); //Clear the old options of the Dropdown menu m_Dropdown.ClearOptions(); for (int i = 0; i < options.Count; i++) { TMP_Dropdown.OptionData m_NewData = new TMP_Dropdown.OptionData(); m_NewData.text = options[i]; m_Dropdown.options.Add(m_NewData); } m_Dropdown.value = 0; m_Dropdown.captionText.text = options[0]; fillCharDropdown(); }