Files
UmaViewer/Assets/Scripts/LiveToolBox/LiveViewerUI.cs
T
CroakFang 009f142f5b Fix some VMD export issues and some other changes (#100)
* Bug fix, improved UI layout and live vocals

* Bug Fixes, New Live Compatibility

* Android build support

* Update build.yml

* Fix issues with the new version of the game

* bug fix

* add config button

* Improve performance

* Sync fork

* bug fix, new uma compatibility

* Add /UserSettings to gitignore

* bug fix, add live characher shader control

* fix compilation errors

* fix compilation errors 2

* fix the live lighting calculation logic

* bug fix, add editor layout settings to gitignore

* bug fix, add editor layout settings to gitignore

* Add time scale keys for live

* live camera bug fix

* add live stage control, optimize live performance

* fix build error

* add uma head custom

* Add tiptoes rotation for VMD export

* Add a save path prompt when exporting VMD files.

* Remove the debug code for body dragging.

* Remove unused physics components to improve performance.

* Fix incorrect VMD exports for loop animations
Fix VMD motion errors during repeated recordings
Fix ghost bone persistence after multiple recordings

* Revert "Remove unused physics components to improve performance."

This reverts commit 7a1ae7f7d13d05380f9215b653d1c6719303a458.

* Reapply "Remove unused physics components to improve performance."

This reverts commit fe4c05f6942198864ca06e25f17a11440961040d.

* fix https://github.com/katboi01/UmaViewer/issues/95

* live timescale bug fix

* bug fix for skin and tail textures in live

* bug fix for skin and tail textures in live (2)

* fix https://github.com/katboi01/UmaViewer/issues/108

* message ui bug fix
2025-07-31 20:43:45 +02:00

71 lines
1.6 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEngine.UI;
public class LiveViewerUI : MonoBehaviour
{
public static LiveViewerUI Instance;
public UnityEngine.UI.Slider ProgressBar;
public RectTransform BottonUITransform;
public Dropdown FrameRateDropDown;
public GameObject RecordingUI;
public Text RecordingText;
public Text LyricsText;
public List<UmaLyricsData> CurrentLyrics = new List<UmaLyricsData>();
float targetHeight = 0;
float height;
private void Awake()
{
height = BottonUITransform.rect.height;
targetHeight = 0;
Invoke(nameof(HideSlider), 1.5f);
Instance = this;
//TrueProgressBar = (UnityEngine.UIElements.Slider)ProgressBar;
}
public void OnMouse(bool isEnter)
{
if (isEnter)
{
targetHeight = 0;
CancelInvoke();
}
else
{
Invoke(nameof(HideSlider), 2.5f);
}
}
private void FixedUpdate()
{
BottonUITransform.anchoredPosition = Vector2.Lerp(BottonUITransform.anchoredPosition, new Vector2(0, targetHeight), Time.fixedDeltaTime * 5);
}
private void HideSlider()
{
targetHeight = -height;
}
public void SetFrameRate(int fps)
{
QualitySettings.vSyncCount = 0;
Application.targetFrameRate = int.Parse(FrameRateDropDown.options[fps].text);
}
public void UpdateLyrics(float time)
{
var text = UmaUtility.GetCurrentLyrics(time, CurrentLyrics);
LyricsText.text = text;
}
}