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
@@ -5,7 +5,6 @@ using UnityEngine;
using static RootMotion.FinalIK.IKSolverVR;
using System.Linq;
using System.IO;
using static UnityEngine.Rendering.VirtualTexturing.Debugging;
using static Gallop.Live.Cutt.LiveTimelineDefine;
namespace Gallop.Live.Cutt
@@ -355,7 +354,7 @@ namespace Gallop.Live.Cutt
MulFrame.Add(mulframe);
}
if (currentFrame % 2 == 0) RecordUma?.Invoke();
if (currentFrame % 2 == 0) RecordUma?.Invoke(); //Set 30 FPS
}
}
@@ -72,7 +72,10 @@ namespace Gallop.Live.Cutt
{
foreach (var key in _currentKey.thisList)
{
_tempAnim.AddClip(key.clip, key.clip.name);
if(key.clip != null)
{
_tempAnim.AddClip(key.clip, key.clip.name);
}
}
}
_tempAnim.wrapMode = WrapMode.Clamp;
@@ -122,13 +125,15 @@ namespace Gallop.Live.Cutt
double interval = (currentTime - arg.FrameSecond) * arg.playSpeed;
float currentAnimationTime = (float)(start + interval);
var state = _tempAnim[anim.name];
state.enabled = true;
state.weight = 1;
state.time = arg.loop ? Mathf.Repeat(currentAnimationTime, state.length) : currentAnimationTime;
_tempAnim.Sample();
state.enabled = false;
if (anim)
{
var state = _tempAnim[anim.name];
state.enabled = true;
state.weight = 1;
state.time = arg.loop ? Mathf.Repeat(currentAnimationTime, state.length) : currentAnimationTime;
_tempAnim.Sample();
state.enabled = false;
}
_prevIndex = _curIndex;
}
_prevFrameAnimationTime = currentTime;