slate runner flush多次执行问题

[Image Removed]

slate 在TICK时,会显式执行一次runner->flush(), 然后在调用RunLatentACtions时,也存在再次flush的情况

这个会造成动画flush可能存在一帧内执行两次flush,这块是否有优化控件和办法​

[Attachment Removed]

Steps to Reproduce

[Attachment Removed]

再补充另个会执行多轮评估的内容,在函数GameThread_PostEvaluationPhase 中会执行这段代码:

// If we have any pending updates, we need to run another evaluation.

// This will cause us to effectively loop back to ERunnerFlushState::Import

// which will pick up the next updates

if (UpdateQueue.Num() > 0 || DissectedUpdates.Num() > 0)

{

FlushState = FlushState::LoopEval;

}

在前面逻辑中,会调用UUMGSequencePlayer::HandleLatentStop, 这个函数内部会对Queue增加任务:

if (TSharedPtr<FMovieSceneEntitySystemRunner> Runner = RootTemplateInstance.GetRunner())

{

Runner->QueueFinalUpdate(RootTemplateInstance.GetRootInstanceHandle());

// Even if our request to Finish the instance was queued, we can wait until the next flush for those effects to be seen

// This will most likely happen immediately anyway since the runner will keep looping until its queue is empty,

// And we are already inside an active evaluation

}

这个是不是造成这个动画ECS系统的评估可能会超过1次,这个是否有必要,是否可以优化, 是否有参考

[Attachment Removed]

不好意思,我漏了这个单子,我这两天看下,感觉貌似是个Bug。

[Attachment Removed]