|
@@ -132,6 +132,10 @@ namespace Live2D.Cubism.Framework.MotionFade
|
|
|
/// <param name="controller">Animation controller playable.</param>
|
|
|
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
|
|
|
{
|
|
|
+ if (animator.gameObject.name == "kp_zuochi2")
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
var fadeController = animator.gameObject.GetComponent<CubismFadeController>();
|
|
|
|
|
|
// Fail silently...
|
|
@@ -190,9 +194,9 @@ namespace Live2D.Cubism.Framework.MotionFade
|
|
|
|
|
|
var instanceId = -1;
|
|
|
var events = animatorClipInfo[i].clip.events;
|
|
|
- for(var k = 0; k < events.Length; ++k)
|
|
|
+ for (var k = 0; k < events.Length; ++k)
|
|
|
{
|
|
|
- if(events[k].functionName != "InstanceId")
|
|
|
+ if (events[k].functionName != "InstanceId")
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
@@ -212,10 +216,16 @@ namespace Live2D.Cubism.Framework.MotionFade
|
|
|
motionIndex = j;
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
+ if (animator.gameObject.name == "kp_zuochi2")
|
|
|
+ {
|
|
|
+ Debug.Log("zoya000:" + motionIndex);
|
|
|
+ Debug.Log("zoya111:" + _cubismFadeMotionList.CubismFadeMotionObjects[motionIndex]);
|
|
|
+ }
|
|
|
playingMotion.Motion = (motionIndex == -1)
|
|
|
- ? null
|
|
|
- : _cubismFadeMotionList.CubismFadeMotionObjects[motionIndex];
|
|
|
+ ? null
|
|
|
+ : _cubismFadeMotionList.CubismFadeMotionObjects[motionIndex];
|
|
|
+
|
|
|
+ Debug.Log("zoya:" + playingMotion.Motion);
|
|
|
|
|
|
playingMotion.Speed = 1.0f;
|
|
|
playingMotion.StartTime = Time.time;
|