When I assigned a prefab in my vertical list of buttons to be clicked the example.json.meta files were also included in the list when I clicked play to see the UI.
how do I remove them?
here are the codes I used
void Start () {
RectTransform rect = gameObject.GetComponent<RectTransform>();
string filePath = Application.streamingAssetsPath;
DirectoryInfo dir = new DirectoryInfo(filePath);
FileInfo[] files = dir.GetFiles ("*.json");
foreach (FileInfo file in files) {
GameObject level = Instantiate(levelPrefab) as GameObject;
level.name = Path.GetFileNameWithoutExtension(file.Name).ToString();
level.transform.SetParent(GameObject.Find("Level/Panel/Scroll/LevelC").GetComponent<Transform>());
level.GetComponentInChildren<Text>().text = level.name;
string levelName = level.name;
level.GetComponent<Button>().onClick.AddListener(() => OnClick(levelName));
level.GetComponent<Button>().onClick.AddListener(() => menu.ShowMenu(GameObject.Find("Canvas/MainQue").GetComponent<Menu>()));