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:
@@ -1,5 +1,7 @@
|
||||
using Gallop;
|
||||
#if !UNITY_ANDROID || UNITY_EDITOR
|
||||
using SFB;
|
||||
#endif
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -171,6 +173,9 @@ public class UmaViewerUI : MonoBehaviour
|
||||
UmaAssetManager.OnLoadedBundleClear += LoadedAssetsClear;
|
||||
|
||||
PoseManager.LoadLocalPoseFiles();
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
canvasScaler.referenceResolution = new Vector2(1280, 720);
|
||||
#endif
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
@@ -1396,6 +1401,7 @@ public class UmaViewerUI : MonoBehaviour
|
||||
|
||||
public void ChangeDataPath()
|
||||
{
|
||||
#if !UNITY_ANDROID || UNITY_EDITOR
|
||||
var path = StandaloneFileBrowser.OpenFolderPanel("Select Folder", Config.Instance.MainPath, false);
|
||||
if (path != null && path.Length > 0 && !string.IsNullOrEmpty(path[0]))
|
||||
{
|
||||
@@ -1405,6 +1411,21 @@ public class UmaViewerUI : MonoBehaviour
|
||||
Config.Instance.UpdateConfig();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public void OpenConfig()
|
||||
{
|
||||
#if !UNITY_ANDROID || UNITY_EDITOR
|
||||
if (File.Exists(Config.configPath))
|
||||
{
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = Config.configPath,
|
||||
UseShellExecute = true
|
||||
});
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public void ChangeOutlineWidth(float val)
|
||||
@@ -1418,6 +1439,7 @@ public class UmaViewerUI : MonoBehaviour
|
||||
|
||||
public void ShowMessage(string msg, UIMessageType type)
|
||||
{
|
||||
if (!MessageText) return;
|
||||
MessageText.text += type switch
|
||||
{
|
||||
UIMessageType.Error => string.Format("<color=red>{0}</color>\n", msg),
|
||||
@@ -1432,6 +1454,7 @@ public class UmaViewerUI : MonoBehaviour
|
||||
|
||||
public void ExportModel()
|
||||
{
|
||||
#if !UNITY_ANDROID || UNITY_EDITOR
|
||||
var container = Builder.CurrentUMAContainer;
|
||||
if (container)
|
||||
{
|
||||
@@ -1442,6 +1465,7 @@ public class UmaViewerUI : MonoBehaviour
|
||||
ModelExporter.ExportModel(container, path);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public void ToggleVisible(GameObject go)
|
||||
|
||||
Reference in New Issue
Block a user