Fixed launch without data files

changed load order to fix error log on missing data files
This commit is contained in:
katboi01
2022-12-22 00:21:19 +01:00
parent 8d85c50efa
commit 3e57846c0e
5 changed files with 21 additions and 19 deletions
+5 -3
View File
@@ -13,10 +13,11 @@ public class ManifestDB
{
public SqliteConnection MetaDB;
public static string DBPath;
public const string DefaultDBPath = "umamusume/meta";
public Action<string> callback;
public ManifestDB(string DBPath = DefaultDBPath)
public ManifestDB()
{
string DBPath = $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "Low"}\\Cygames\\umamusume\\meta";
ManifestDB.DBPath = DBPath;
if (File.Exists(DBPath))
{
@@ -25,6 +26,7 @@ public class ManifestDB
}
else
{
Directory.CreateDirectory(Path.GetDirectoryName(DBPath));
SqliteConnection.CreateFile(DBPath);
MetaDB = new SqliteConnection($@"Data Source={DBPath}");
MetaDB.Open();
@@ -51,7 +53,7 @@ public class ManifestDB
callback?.Invoke("Checking Resource Version");
yield return UpdateMetaDB();
yield return UpdateMasterDB();
callback?.Invoke($"Done");
callback?.Invoke($"Done. Please restart the application.");
}
//umamusume uses the manifest file to generate meta database.
+1 -1
View File
@@ -4,7 +4,7 @@ MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
executionOrder: -3
icon: {instanceID: 0}
userData:
assetBundleName: