Not 100% reproducible, but sometimes, when saving a scene by pressing ‘Ctrl-S’ while Slate is still in cutscene preview, the scene will save actor and animator skeleton positions at that moment in the timeline. If Mecanim animation is being done using root motion, and characters are saved in different positions from when the cutscene was authored, then characters will likely start their animations in those, incorrect, positions.
Can Slate exit preview before a Save operation is carried out?
So I’ve put together a sample project which consistently reproduces the issue. It’s a blank scene with a character, and a slate cutscene, which moves the character under root motion with a walk animation.
If the cutscene is previewed, the walk animation is paused halfway, and the scene is then saved, the scene will be saved with the actor in that position. If Unity crashes (or the user does not save again) after stopping the preview, the actor’s position will not be reverted. Likewise, if the user decides to QUIT Unity while previewing the animation, and DOES choose to save at that point, the same problem will occur – this is perhaps the more likely problem scenario.
@Gavalakis – would it be useful to share this sample project with you?
Sorry for the late reply!
Properly handling scene saving has already been added for the next version. (cutscene is now reverted before the scene is saved automatically).
This only work for Unity 5.6+ though, since Unity added a nice callback for when scene is about to be saved in version 5.6.
If you want to modify the source code now and add this change and not wait for the next version, please open up CutsceneEditor.cs and:
1) In OnEnable() method add this code in the beginning: