mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2026-03-22 04:44:08 +07:00
fix inspector play button
This commit is contained in:
@@ -23,7 +23,14 @@ namespace FTEditor.Editors {
|
||||
AllControllersForeach(ctrl => ctrl.Stop(ctrl.isStopped));
|
||||
}
|
||||
if ( GUILayout.Button("Play") ) {
|
||||
AllControllersForeach(ctrl => ctrl.Play(ctrl.isPlaying));
|
||||
AllControllersForeach(ctrl => {
|
||||
var rewind =
|
||||
ctrl.isPlaying ||
|
||||
(ctrl.clip && (
|
||||
ctrl.clip.currentFrame == 0 ||
|
||||
ctrl.clip.currentFrame == ctrl.clip.frameCount - 1));
|
||||
ctrl.Play(rewind);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user