private void Awake() { //workspacePath = GameObject.Find("DataCache").GetComponent<DataCache>().Find("WorkspaceName"); var dataPath = FileAndDirectory.Instance.WorkspacePath; string workspacePath = "Demo"; //folderList = new List<GameObject>(); //fileList = new List<GameObject>(); FileAndDirectory.Instance.ProjectName = workspacePath; //UpdateDictionaryTree(FileAndDictionary.Instance.FolderPath, transform); dt = new DirectoryTree(FileAndDirectory.Instance.FolderPath, transform); dt.ScanFolder(folderObj, fileObj); dt.Extend(); }
public void OpenFolder(GameObject obj) { List <string> path = new List <string> { obj.name }; Transform t = obj.transform; t = t.parent; while (t != transform) { path.Add(t.name); t = t.parent; } DirectoryTree dtt = dt; for (int i = path.Count - 1; i >= 0; i--) { dtt = dtt.Find(path[i]); } dtt.Extend(); }