Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -2635,7 +2635,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
m_AnchorMax: {x: 1, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
m_AnchoredPosition: {x: -0.5, y: 252.35}
|
m_AnchoredPosition: {x: -0.5, y: 242}
|
||||||
m_SizeDelta: {x: -85, y: 30}
|
m_SizeDelta: {x: -85, y: 30}
|
||||||
m_Pivot: {x: 0.5, y: 1}
|
m_Pivot: {x: 0.5, y: 1}
|
||||||
--- !u!114 &212377233
|
--- !u!114 &212377233
|
||||||
@@ -3871,7 +3871,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: -104.3}
|
m_AnchoredPosition: {x: 0, y: -99}
|
||||||
m_SizeDelta: {x: -224, y: 30}
|
m_SizeDelta: {x: -224, y: 30}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &292348637
|
--- !u!114 &292348637
|
||||||
@@ -13368,7 +13368,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: -151.5}
|
m_AnchoredPosition: {x: 0, y: -149}
|
||||||
m_SizeDelta: {x: -16, y: 25}
|
m_SizeDelta: {x: -16, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &994851660
|
--- !u!114 &994851660
|
||||||
@@ -13416,7 +13416,7 @@ MonoBehaviour:
|
|||||||
m_HandleRect: {fileID: 1647140268}
|
m_HandleRect: {fileID: 1647140268}
|
||||||
m_Direction: 0
|
m_Direction: 0
|
||||||
m_MinValue: 0
|
m_MinValue: 0
|
||||||
m_MaxValue: 1
|
m_MaxValue: 2
|
||||||
m_WholeNumbers: 0
|
m_WholeNumbers: 0
|
||||||
m_Value: 1
|
m_Value: 1
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
@@ -15672,7 +15672,7 @@ MonoBehaviour:
|
|||||||
m_HandleRect: {fileID: 1882365342}
|
m_HandleRect: {fileID: 1882365342}
|
||||||
m_Direction: 2
|
m_Direction: 2
|
||||||
m_Value: 1
|
m_Value: 1
|
||||||
m_Size: 0.8225314
|
m_Size: 0.74480647
|
||||||
m_NumberOfSteps: 0
|
m_NumberOfSteps: 0
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
@@ -20819,8 +20819,8 @@ RectTransform:
|
|||||||
m_Father: {fileID: 1145728918}
|
m_Father: {fileID: 1145728918}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 1, y: 0}
|
m_AnchorMin: {x: 0.5, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 0.5, y: 1}
|
||||||
m_AnchoredPosition: {x: -10, y: 0}
|
m_AnchoredPosition: {x: -10, y: 0}
|
||||||
m_SizeDelta: {x: 20, y: -4}
|
m_SizeDelta: {x: 20, y: -4}
|
||||||
m_Pivot: {x: 0, y: 0.5}
|
m_Pivot: {x: 0, y: 0.5}
|
||||||
@@ -24493,7 +24493,7 @@ RectTransform:
|
|||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 0.5, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 10, y: 0}
|
m_SizeDelta: {x: 10, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
@@ -32306,7 +32306,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: -50}
|
m_AnchoredPosition: {x: 0, y: -80}
|
||||||
m_SizeDelta: {x: 0, y: -100}
|
m_SizeDelta: {x: 0, y: -100}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &6878219667498913897
|
--- !u!114 &6878219667498913897
|
||||||
@@ -32703,7 +32703,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
m_AnchorMax: {x: 1, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
m_AnchoredPosition: {x: -0.5, y: 219}
|
m_AnchoredPosition: {x: -0.5, y: 201}
|
||||||
m_SizeDelta: {x: -85, y: 30}
|
m_SizeDelta: {x: -85, y: 30}
|
||||||
m_Pivot: {x: 0.5, y: 1}
|
m_Pivot: {x: 0.5, y: 1}
|
||||||
--- !u!114 &6878219667641514016
|
--- !u!114 &6878219667641514016
|
||||||
@@ -34109,7 +34109,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: -50}
|
m_AnchoredPosition: {x: 0, y: -80}
|
||||||
m_SizeDelta: {x: 0, y: -100}
|
m_SizeDelta: {x: 0, y: -100}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &6878219668012581467
|
--- !u!114 &6878219668012581467
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ public class UmaViewerBuilder : MonoBehaviour
|
|||||||
|
|
||||||
public UmaHeadData CurrentHead;
|
public UmaHeadData CurrentHead;
|
||||||
|
|
||||||
|
public Shader hairShader;
|
||||||
|
public Shader faceShader;
|
||||||
|
public Shader eyeShader;
|
||||||
|
public Shader cheekShader;
|
||||||
|
public Shader eyebrowShader;
|
||||||
|
|
||||||
public List<AudioSource> CurrentAudioSources = new List<AudioSource>();
|
public List<AudioSource> CurrentAudioSources = new List<AudioSource>();
|
||||||
public List<UmaLyricsData> CurrentLyrics = new List<UmaLyricsData>();
|
public List<UmaLyricsData> CurrentLyrics = new List<UmaLyricsData>();
|
||||||
|
|
||||||
@@ -173,8 +179,9 @@ public class UmaViewerBuilder : MonoBehaviour
|
|||||||
int head_id;
|
int head_id;
|
||||||
string head_costumeId;
|
string head_costumeId;
|
||||||
int tailId = (int)charaData["tailModelId"];
|
int tailId = (int)charaData["tailModelId"];
|
||||||
|
|
||||||
if (id == 9006) tailId = -1;//The tailId of 9006 is 1, but the character has no tail
|
//The tailId of 9006 is 1, but the character has no tail
|
||||||
|
if (id == 9006) tailId = -1;
|
||||||
|
|
||||||
if (UI.isHeadFix && CurrentHead != null)
|
if (UI.isHeadFix && CurrentHead != null)
|
||||||
{
|
{
|
||||||
@@ -605,8 +612,19 @@ public class UmaViewerBuilder : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (bundle.name == "shader.a")
|
if (bundle.name == "shader.a")
|
||||||
{
|
{
|
||||||
if (Main.ShadersLoaded) return;
|
if (Main.ShadersLoaded)
|
||||||
else Main.ShadersLoaded = true;
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hairShader = (Shader)bundle.LoadAsset("assets/_gallop/resources/shader/3d/character/charactertoonhairtser.shader");
|
||||||
|
faceShader = (Shader)bundle.LoadAsset("assets/_gallop/resources/shader/3d/character/charactertoonfacetser.shader");
|
||||||
|
eyeShader = (Shader)bundle.LoadAsset("assets/_gallop/resources/shader/3d/character/charactertooneyet.shader");
|
||||||
|
cheekShader = (Shader)bundle.LoadAsset("assets/_gallop/resources/shader/3d/character/charactermultiplycheek.shader");
|
||||||
|
eyebrowShader = (Shader)bundle.LoadAsset("assets/_gallop/resources/shader/3d/character/charactertoonmayu.shader");
|
||||||
|
Main.ShadersLoaded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (string name in bundle.GetAllAssetNames())
|
foreach (string name in bundle.GetAllAssetNames())
|
||||||
@@ -816,19 +834,25 @@ public class UmaViewerBuilder : MonoBehaviour
|
|||||||
switch (m.shader.name)
|
switch (m.shader.name)
|
||||||
{
|
{
|
||||||
case "Gallop/3D/Chara/MultiplyCheek":
|
case "Gallop/3D/Chara/MultiplyCheek":
|
||||||
|
m.shader = cheekShader;
|
||||||
m.CopyPropertiesFromMaterial(TransMaterialCharas);
|
m.CopyPropertiesFromMaterial(TransMaterialCharas);
|
||||||
break;
|
break;
|
||||||
case "Gallop/3D/Chara/ToonFace/TSER":
|
case "Gallop/3D/Chara/ToonFace/TSER":
|
||||||
|
m.shader = faceShader;
|
||||||
m.SetFloat("_CylinderBlend", 0.25f);
|
m.SetFloat("_CylinderBlend", 0.25f);
|
||||||
m.SetColor("_RimColor", new Color(0, 0, 0, 0));
|
m.SetColor("_RimColor", new Color(0, 0, 0, 0));
|
||||||
break;
|
break;
|
||||||
case "Gallop/3D/Chara/ToonEye/T":
|
case "Gallop/3D/Chara/ToonEye/T":
|
||||||
|
m.shader = eyeShader;
|
||||||
m.SetFloat("_CylinderBlend", 0.25f);
|
m.SetFloat("_CylinderBlend", 0.25f);
|
||||||
break;
|
break;
|
||||||
case "Gallop/3D/Chara/ToonHair/TSER":
|
case "Gallop/3D/Chara/ToonHair/TSER":
|
||||||
|
m.shader = hairShader;
|
||||||
m.SetFloat("_CylinderBlend", 0.25f);
|
m.SetFloat("_CylinderBlend", 0.25f);
|
||||||
break;
|
break;
|
||||||
|
case "Gallop/3D/Chara/ToonMayu":
|
||||||
|
m.shader = eyebrowShader;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Debug.Log(m.shader.name);
|
Debug.Log(m.shader.name);
|
||||||
// m.shader = Shader.Find("Nars/UmaMusume/Body");
|
// m.shader = Shader.Find("Nars/UmaMusume/Body");
|
||||||
@@ -887,11 +911,12 @@ public class UmaViewerBuilder : MonoBehaviour
|
|||||||
RecursiveLoadAsset(motion_e);
|
RecursiveLoadAsset(motion_e);
|
||||||
RecursiveLoadAsset(motion_s);
|
RecursiveLoadAsset(motion_s);
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentUMAContainer.OverrideController["clip_1"] = CurrentUMAContainer.OverrideController["clip_2"];
|
|
||||||
var lastTime = CurrentUMAContainer.UmaAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime;
|
var lastTime = CurrentUMAContainer.UmaAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime;
|
||||||
CurrentUMAContainer.UmaAnimator.Play("motion_1", 0, lastTime);
|
CurrentUMAContainer.OverrideController["clip_1"] = CurrentUMAContainer.OverrideController["clip_2"];
|
||||||
CurrentUMAContainer.OverrideController["clip_2"] = clip;
|
CurrentUMAContainer.OverrideController["clip_2"] = clip;
|
||||||
|
|
||||||
|
CurrentUMAContainer.UmaAnimator.Play("motion_1", 0, lastTime);
|
||||||
CurrentUMAContainer.UmaAnimator.SetTrigger(needTransit ? "next_s" : "next");
|
CurrentUMAContainer.UmaAnimator.SetTrigger(needTransit ? "next_s" : "next");
|
||||||
}
|
}
|
||||||
else if(clip.name.EndsWith("_S"))
|
else if(clip.name.EndsWith("_S"))
|
||||||
@@ -916,9 +941,9 @@ public class UmaViewerBuilder : MonoBehaviour
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CurrentUMAContainer.UmaAnimator.Play("motion_1", 0, lastTime);
|
CurrentUMAContainer.UmaAnimator.Play("motion_1", 0, lastTime);
|
||||||
|
CurrentUMAContainer.UmaAnimator.SetTrigger(needTransit ? "next_s" : "next");
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentUMAContainer.UmaAnimator.SetTrigger(needTransit ? "next_s" : "next");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -310,7 +310,6 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SetCriWare(bool value)
|
public void SetCriWare(bool value)
|
||||||
{
|
{
|
||||||
isCriware = value;
|
isCriware = value;
|
||||||
@@ -319,7 +318,6 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
public void SetHeadFix(bool value)
|
public void SetHeadFix(bool value)
|
||||||
{
|
{
|
||||||
isHeadFix = value;
|
isHeadFix = value;
|
||||||
UnityEngine.Debug.Log(isHeadFix);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListLiveSounds(int songid)
|
void ListLiveSounds(int songid)
|
||||||
@@ -456,7 +454,8 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
|
|
||||||
public void LoadedAnimation()
|
public void LoadedAnimation()
|
||||||
{
|
{
|
||||||
AnimationSlider.value = 0f;
|
if (!Builder.CurrentUMAContainer || !Builder.CurrentUMAContainer.UmaAnimator) return;
|
||||||
|
AnimationSlider.SetValueWithoutNotify(0);
|
||||||
// Reset settings by Panel
|
// Reset settings by Panel
|
||||||
Builder.CurrentUMAContainer.UmaAnimator.speed = AnimationSpeedSlider.value;
|
Builder.CurrentUMAContainer.UmaAnimator.speed = AnimationSpeedSlider.value;
|
||||||
}
|
}
|
||||||
@@ -501,7 +500,6 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
{
|
{
|
||||||
cySpring.EnablePhysics(isOn);
|
cySpring.EnablePhysics(isOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,12 +545,12 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
source.time = source.clip.length * val;
|
source.time = source.clip.length * val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AnimationPause()
|
public void AnimationPause()
|
||||||
{
|
{
|
||||||
|
if (!Builder.CurrentUMAContainer || !Builder.CurrentUMAContainer.UmaAnimator) return;
|
||||||
if (Builder.OverrideController.animationClips.Length > 0)
|
if (Builder.OverrideController.animationClips.Length > 0)
|
||||||
{
|
{
|
||||||
var animator = Builder.CurrentUMAContainer.UmaAnimator;
|
var animator = Builder.CurrentUMAContainer.UmaAnimator;
|
||||||
@@ -577,6 +575,7 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
|
|
||||||
public void AnimationProgressChange(float val)
|
public void AnimationProgressChange(float val)
|
||||||
{
|
{
|
||||||
|
if (!Builder.CurrentUMAContainer || !Builder.CurrentUMAContainer.UmaAnimator) return;
|
||||||
var animator = Builder.CurrentUMAContainer.UmaAnimator;
|
var animator = Builder.CurrentUMAContainer.UmaAnimator;
|
||||||
if (animator != null)
|
if (animator != null)
|
||||||
{
|
{
|
||||||
@@ -590,12 +589,9 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
|
|
||||||
public void AnimationSpeedChange(float val)
|
public void AnimationSpeedChange(float val)
|
||||||
{
|
{
|
||||||
var animator = Builder.CurrentUMAContainer.UmaAnimator;
|
AnimationSpeedText.text = string.Format("Animation Speed: {0:F2}", val);
|
||||||
if (animator != null)
|
if (!Builder.CurrentUMAContainer || !Builder.CurrentUMAContainer.UmaAnimator) return;
|
||||||
{
|
Builder.CurrentUMAContainer.UmaAnimator.speed = val;
|
||||||
Builder.CurrentUMAContainer.UmaAnimator.speed = val;
|
|
||||||
AnimationSpeedText.text = $"Animation Speed: {val}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
@@ -612,16 +608,19 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Builder.CurrentUMAContainer != null && Builder.CurrentUMAContainer.OverrideController["clip_2"].name != "clip_2")
|
|
||||||
|
if (Builder.CurrentUMAContainer != null && Builder.CurrentUMAContainer.OverrideController != null)
|
||||||
{
|
{
|
||||||
var AnimeState = Builder.CurrentUMAContainer.UmaAnimator.GetCurrentAnimatorStateInfo(0);
|
if(Builder.CurrentUMAContainer.OverrideController["clip_2"].name != "clip_2")
|
||||||
var AnimeClip = Builder.CurrentUMAContainer.OverrideController["clip_2"];
|
|
||||||
if (AnimeClip && Builder.CurrentUMAContainer.UmaAnimator.speed != 0)
|
|
||||||
{
|
{
|
||||||
AnimationTitleText.text = AnimeClip.name;
|
var AnimeState = Builder.CurrentUMAContainer.UmaAnimator.GetCurrentAnimatorStateInfo(0);
|
||||||
var normalizedTime = (AnimeState.normalizedTime < 1.0f) ? AnimeState.normalizedTime : 1.0f;
|
var AnimeClip = Builder.CurrentUMAContainer.OverrideController["clip_2"];
|
||||||
AnimationProgressText.text = string.Format("{0} / {1}", ToFrameFormat(normalizedTime * AnimeClip.length, AnimeClip.frameRate), ToFrameFormat(AnimeClip.length, AnimeClip.frameRate));
|
if (AnimeClip && Builder.CurrentUMAContainer.UmaAnimator.speed != 0)
|
||||||
AnimationSlider.SetValueWithoutNotify(normalizedTime);
|
{
|
||||||
|
AnimationTitleText.text = AnimeClip.name;
|
||||||
|
AnimationProgressText.text = string.Format("{0} / {1}", ToFrameFormat(Mathf.Repeat(AnimeState.normalizedTime, 1) * AnimeClip.length, AnimeClip.frameRate), ToFrameFormat(AnimeClip.length, AnimeClip.frameRate));
|
||||||
|
AnimationSlider.SetValueWithoutNotify(Mathf.Repeat(AnimeState.normalizedTime, 1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user