Merge branch 'loop-behavior' of https://github.com/Tryibion/FlaxEngine into Tryibion-loop-behavior
This commit is contained in:
@@ -109,7 +109,14 @@ void Behavior::UpdateAsync()
|
||||
const BehaviorUpdateResult result = tree->Graph.Root->InvokeUpdate(context);
|
||||
if (result != BehaviorUpdateResult::Running)
|
||||
_result = result;
|
||||
if (_result != BehaviorUpdateResult::Running)
|
||||
if (_result != BehaviorUpdateResult::Running && tree->Graph.Root->Loop)
|
||||
{
|
||||
// Reset State
|
||||
_result = BehaviorUpdateResult::Running;
|
||||
_accumulatedTime = 0.0f;
|
||||
_totalTime = 0;
|
||||
}
|
||||
else if (_result != BehaviorUpdateResult::Running)
|
||||
{
|
||||
Finished();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user