Sync fork (#73)

* Improved UI layout and live vocals

* New Live Compatibility

* Android build support

* Update build.yml

* Fix issues with the new version of the game

* add config button

* Improve performance

* bug fix, new uma compatibility

---------

Co-authored-by: CroakFang <1605296300@qq.com>
This commit is contained in:
katboi01
2024-11-06 23:58:45 +01:00
committed by GitHub
parent 817b8a3954
commit d97cb906de
23 changed files with 919 additions and 269 deletions
+21 -6
View File
@@ -2,7 +2,8 @@
using UnityEngine;
using System.Linq;
using System.Collections.Generic;
using static UnityEngine.Rendering.VirtualTexturing.Debugging;
using System;
using Object = UnityEngine.Object;
public class UmaDatabaseEntry
{
@@ -16,12 +17,27 @@ public class UmaDatabaseEntry
{
get
{
var path = $"{Config.Instance.MainPath}\\dat\\{Url.Substring(0, 2)}\\{Url}";
if (Config.Instance.WorkMode == WorkMode.Standalone && !File.Exists(path))
if (Config.Instance.DownloadMissingResources && !File.Exists(Path))
{
DownloadAsset(this);
}
return path;
return Path;
}
}
public string Path
{
get
{
return $"{Config.Instance.MainPath}/dat/{Url.Substring(0, 2)}/{Url}";
}
}
public bool IsAssetBundle
{
get
{
return string.IsNullOrEmpty(System.IO.Path.GetExtension(Name));
}
}
@@ -42,8 +58,7 @@ public class UmaDatabaseEntry
//TODO Make it async
public static void DownloadAsset(UmaDatabaseEntry entry)
{
var path = $"{Config.Instance.MainPath}\\dat\\{entry.Url.Substring(0, 2)}\\{entry.Url}";
UmaViewerDownload.DownloadAssetSync(entry, path, delegate (string msg, UIMessageType type)
UmaViewerDownload.DownloadAssetSync(entry, delegate (string msg, UIMessageType type)
{
UmaViewerUI.Instance.ShowMessage(msg, type);
});