diff --git a/Unity Project/IC Viewer/Assets/Scripts/EditorManager.cs b/Unity Project/IC Viewer/Assets/Scripts/EditorManager.cs index eaeeb53..31c4835 100644 --- a/Unity Project/IC Viewer/Assets/Scripts/EditorManager.cs +++ b/Unity Project/IC Viewer/Assets/Scripts/EditorManager.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Net; using SFB; @@ -34,11 +35,13 @@ void Start() /*thirdColor*/); //0.502f, 0.502f, 0.502f, 1 // Autoload the online version of the database + StartCoroutine(ImportDatabase()); + } + + private IEnumerator ImportDatabase() + { WWW www = new WWW(DatabaseUrl); - while (!www.isDone) - { - // Wait until the download finished - } + yield return www; LoadBodies(www.text); Logger.Info("Imported default star database"); }