Fix last frame importing from animations to correctly loop

This commit is contained in:
Wojtek Figat
2025-03-31 13:38:13 +02:00
parent 0046cbe0ef
commit e0251afe79
4 changed files with 27 additions and 22 deletions

View File

@@ -160,7 +160,7 @@ namespace FlaxEditor.GUI.Timeline
{
if (_preview != null)
{
frame = Mathf.Clamp(frame, 0, DurationFrames - 1);
frame = Mathf.Clamp(frame, 0, DurationFrames);
var time = frame / FramesPerSecond;
Editor.Internal_SetAnimationTime(Object.GetUnmanagedPtr(_preview.PreviewActor), time);
if (!_preview.PlayAnimation)