Improving physics and code

This commit is contained in:
CroakFang
2023-12-11 21:36:43 +08:00
parent 2acf15cb43
commit ac63cfe83e
7 changed files with 33 additions and 51 deletions
+3 -2
View File
@@ -304,7 +304,8 @@ public class ManifestDB
public IEnumerator DownloadManifest(string hash)
{
UnityWebRequest www = UnityWebRequest.Get(UmaViewerDownload.GetManifestRequestUrl(hash));
var url = UmaViewerDownload.GetManifestRequestUrl(hash);
UnityWebRequest www = UnityWebRequest.Get(url);
www.timeout = 15;
yield return www.SendWebRequest();
if (www.result == UnityWebRequest.Result.Success)
@@ -313,7 +314,7 @@ public class ManifestDB
}
else
{
Debug.LogError("Download Manifest Failed :" + www.error);
Debug.LogError($"Download Manifest Failed :{url} {www.error}");
callback?.Invoke($"Download Manifest Failed :{www.error}", UIMessageType.Error);
isError = true;
yield break;
+10
View File
@@ -291,6 +291,15 @@ public class UmaContainerCharacter : UmaContainer
}
}
public void ResetDynamicBone()
{
if (IsMini) return;
foreach (CySpringDataContainer cySpring in cySpringDataContainers)
{
cySpring.ResetPhysics();
}
}
public void SetEyeTracking(bool isOn)
{
EnableEyeTracking = isOn;
@@ -1121,6 +1130,7 @@ public class UmaContainerCharacter : UmaContainer
if (clip.name.Contains("_cti_crd"))
{
ResetDynamicBone();
var dir = Path.GetDirectoryName(clip.name).Replace("\\", "/");
string[] param = Path.GetFileName(clip.name).Split('_');
if (param.Length > 4)
@@ -158,5 +158,13 @@ namespace Gallop
dynamic.enabled = isOn;
}
}
public void ResetPhysics()
{
foreach (DynamicBone dynamic in DynamicBones)
{
dynamic.ResetParticlesPosition();
}
}
}
}
@@ -973,7 +973,8 @@ namespace Gallop
MangaMorph.BindProperties[1].Value = 1;
}
var tearytype = info.tearyType;
var tearyEnable = ((int)info.attribute & LiveTimelineKeyFacialEffectData.kAttrTeary) > 0;
var tearytype = tearyEnable ? info.tearyType : 0;
StaticTearMorph.BindProperties.ForEach(p => p.Value = tearytype);
var shaderEnable = ((int)info.attribute & LiveTimelineKeyFacialEffectData.kAttrFaceShadowVisible) > 0;
@@ -6,13 +6,21 @@ using UnityEngine;
namespace Gallop.Live.Cutt
{
[Flags]
public enum LiveTimelineKeyAttribute
{
Disable = 1,
CameraDelayEnable = 2,
CameraDelayInherit = 4,
KeyCommonBitMask = 32768
}
KeyCommonBitMask = 32768,
kAttrCheek = 65536,
kAttrTeary = 131072,
kAttrTearful = 262144,
kAttrTeardrop = 524288,
kAttrMangame = 2097152,
kAttrFaceShadow = 4194304,
kAttrFaceShadowVisible = 8388608,
}
public enum LiveTimelineKeyDataListAttr
{