/// <summary> /// Coroutine to loads the database. /// </summary> /// <param name="file">File to load</param> private IEnumerator ProcessFile(LoadRequest file) { // Register that the file is being loaded. _BeingProcessed.Add(file); // Now start loading the file file.root = new Database(file.path, null, settings); yield return(StartCoroutine(file.root.ParseAsynchronously(this))); // Import into our scene. file.root.ImportIntoScene(); // Callback? if (file.callback != null) { file.callback(file.root); } _BeingProcessed.Remove(file); UpdateLoaders(); }