Пример #1
0
    // Use this for initialization
    void Start()
    {
        string path             = Application.dataPath + "\\projects\\";
        bool   previousProjects = DirectoryUtil.AssertDirectoryExistsOrRecreate(path);

        if (previousProjects)
        {
            DirectoryInfo[] subDirs = DirectoryUtil.getSubDirectoriesByParent(path);
            foreach (DirectoryInfo info in subDirs)
            {
                ProjectData newProject = new ProjectData();
                newProject.projectFolderPath = info.FullName;
                print("exists");
                WarningSystem.addWarning("Project Found", "Path:" + newProject.projectFolderPath, Code.Info);
            }
        }
    }
Пример #2
0
    void Start()
    {
        // Build a list of all projects
        string path             = Application.dataPath + "\\projects\\";
        bool   previousProjects = DirectoryUtil.AssertDirectoryExistsOrRecreate(path);

        if (previousProjects)
        {
            DirectoryInfo[] subDirs = DirectoryUtil.getSubDirectoriesByParent(path);
            foreach (DirectoryInfo info in subDirs)
            {
                ProjectData newProject = new ProjectData();
                newProject.projectFolderPath = info.FullName;
                newProject.projectName       = info.Name;
                //WarningSystem.addWarning("New Project Folder", "New path:" + newProject.projectFolderPath, Code.Info);
                projects.Add(newProject);
            }
        }
    }