|
@@ -149,7 +149,7 @@ namespace Live2D.Cubism.Framework.MotionFade
|
|
|
|
|
|
var animatorClipInfo = controller.GetNextAnimatorClipInfo(layerIndex);
|
|
|
|
|
|
- _isDefaulState = (animatorClipInfo.Length == 0);
|
|
|
+ _isDefaulState = (animatorClipInfo == null || animatorClipInfo.Length == 0);
|
|
|
|
|
|
if (_isDefaulState)
|
|
|
{
|
|
@@ -220,6 +220,10 @@ namespace Live2D.Cubism.Framework.MotionFade
|
|
|
playingMotion.Speed = 1.0f;
|
|
|
playingMotion.StartTime = Time.time;
|
|
|
playingMotion.FadeInStartTime = Time.time;
|
|
|
+ if(playingMotion.Motion == null)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
playingMotion.EndTime = (playingMotion.Motion.MotionLength <= 0)
|
|
|
? -1
|
|
|
: playingMotion.StartTime + playingMotion.Motion.MotionLength;
|