Add displaying playback position of animation in Anim Graph window

This commit is contained in:
Wojtek Figat
2024-01-05 22:06:44 +01:00
parent 6d58883454
commit af0439f3ce
3 changed files with 63 additions and 0 deletions

View File

@@ -396,6 +396,16 @@ namespace FlaxEditor.Windows.Assets
/// <inheritdoc />
public override void OnUpdate()
{
// Extract animations playback state from the events tracing
var debugActor = _debugPicker.Value as AnimatedModel;
if (debugActor == null)
debugActor = _preview.PreviewActor;
if (debugActor != null)
{
debugActor.EnableTracing = true;
Surface.LastTraceEvents = debugActor.TraceEvents;
}
base.OnUpdate();
// Update graph execution flow debugging visualization
@@ -416,6 +426,8 @@ namespace FlaxEditor.Windows.Assets
/// <inheritdoc />
public override void OnDestroy()
{
if (IsDisposing)
return;
Animations.DebugFlow -= OnDebugFlow;
_properties = null;