// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "AsyncTreeDifferences.h" class SStateTreeView; class UStateTreeState; namespace UE::StateTree::Diff { struct FSingleDiffEntry; class STATETREEEDITORMODULE_API FAsyncDiff : public TAsyncTreeDifferences> { public: FAsyncDiff(const TSharedRef& LeftTree, const TSharedRef& RightTree); void GetStateTreeDifferences(TArray& OutDiffEntries) const; private: void GetStatesDifferences(TArray& OutDiffEntries) const; static TAttribute>> RootNodesAttribute(TWeakPtr StateTreeView); TSharedPtr LeftView; TSharedPtr RightView; }; } // UE::StateTree::Diff template <> class STATETREEEDITORMODULE_API TTreeDiffSpecification> { public: bool AreValuesEqual(const TWeakObjectPtr& StateTreeNodeA, const TWeakObjectPtr& StateTreeNodeB, TArray* OutDifferingProperties = nullptr) const; bool AreMatching(const TWeakObjectPtr& StateTreeNodeA, const TWeakObjectPtr& StateTreeNodeB, TArray* OutDifferingProperties = nullptr) const; void GetChildren(const TWeakObjectPtr& InParent, TArray>& OutChildren) const; bool ShouldMatchByValue(const TWeakObjectPtr&) const { return false; } bool ShouldInheritEqualFromChildren(const TWeakObjectPtr&, const TWeakObjectPtr&) const { return false; } };