File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
Assets/Live2D/Cubism/Framework Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,6 @@ private void UpdateFade(ICubismFadeState fadeState)
137
137
138
138
var time = Time . time ;
139
139
140
- var isDoneAllFadeIn = true ;
141
-
142
140
// Calculate MotionFade.
143
141
for ( var i = 0 ; i < playingMotions . Count ; i ++ )
144
142
{
@@ -222,18 +220,10 @@ private void UpdateFade(ICubismFadeState fadeState)
222
220
fadeMotion . ParameterFadeInTimes [ index ] , fadeMotion . ParameterFadeOutTimes [ index ] ,
223
221
motionWeight , DestinationParts [ j ] . Opacity ) ;
224
222
}
225
-
226
-
227
- if ( erapsedTime > fadeInTime )
228
- {
229
- continue ;
230
- }
231
- isDoneAllFadeIn = false ;
232
223
}
233
224
234
- if ( ! isDoneAllFadeIn || ! fadeState . GetStateTransitionFinished ( ) )
225
+ if ( ! fadeState . GetStateTransitionFinished ( ) )
235
226
{
236
- // Do not process any motion that has never finished fade-in.
237
227
return ;
238
228
}
239
229
@@ -250,7 +240,7 @@ private void UpdateFade(ICubismFadeState fadeState)
250
240
continue ;
251
241
}
252
242
253
- // If fade-in of all motion has been completed, delete the motion that has been played back.
243
+ // If fade-in has been completed, delete the motion that has been played back.
254
244
fadeState . StopAnimation ( i ) ;
255
245
}
256
246
}
Original file line number Diff line number Diff line change @@ -47,17 +47,17 @@ private static void RegisterModelImporter()
47
47
private static void OnModelImport ( CubismModel3JsonImporter sender , CubismModel model )
48
48
{
49
49
var shouldImportAsOriginalWorkflow = CubismUnityEditorMenu . ShouldImportAsOriginalWorkflow ;
50
+ var pose3Json = sender . Model3Json . Pose3Json ;
50
51
51
52
// Fail silently...
52
- if ( ! shouldImportAsOriginalWorkflow )
53
+ if ( ! shouldImportAsOriginalWorkflow || pose3Json == null )
53
54
{
54
55
return ;
55
56
}
56
57
57
58
var assetsDirectoryPath = Application . dataPath . Replace ( "Assets" , "" ) ;
58
59
var assetPath = sender . AssetPath . Replace ( assetsDirectoryPath , "" ) ;
59
60
var fileReferences = sender . Model3Json . FileReferences ;
60
- var pose3Json = sender . Model3Json . Pose3Json ;
61
61
62
62
// Create pose animation clip
63
63
var motions = new List < CubismModel3Json . SerializableMotion > ( ) ;
You can’t perform that action at this time.
0 commit comments