public static void GetAllRepositories() { if (Authoring.repositories != null) { return; } Debug.Log("GetAllRepositories"); List <Repository> reps = new List <Repository>(); List <Repositories> repsLut = new List <Repositories> (); foreach (int id in Enum.GetValues(typeof(Authoring.Repositories))) { Repository _rep = new Repository((Authoring.Repositories)id); reps.Add(_rep); repsLut.Add((Authoring.Repositories)id); _rep.LocalPath = Authoring.GetRepositoryLocalPath(_rep.Target); _rep.CheckRepository(); } // DirectoryInfo directory = new DirectoryInfo(Application.dataPath); // FileInfo[] goFileInfo = directory.GetFiles("*.unity", SearchOption.AllDirectories); repositories = reps.ToArray(); repositoriesLut = repsLut.ToArray(); }
/// <summary> /// Called by the system. /// This is for consistency during unity recompilation, and to avoid having to serialize items. /// </summary> protected virtual void OnEnable() { // Debug.Log("################ OnEnable"); // get editor prefs GetEditorPrefs(); Authoring.GetAllRepositories(); }