| 868 | |
| 869 | #if WITH_EDITOR |
| 870 | void UFlowAsset::SetInspectedInstance(TWeakObjectPtr<const UFlowAsset> NewInspectedInstance) |
| 871 | { |
| 872 | if (NewInspectedInstance.IsValid()) |
| 873 | { |
| 874 | if (InspectedInstance == NewInspectedInstance) |
| 875 | { |
| 876 | // Nothing changed |
| 877 | return; |
| 878 | } |
| 879 | |
| 880 | bool bIsNewInstancePresent = Algo::AnyOf(ActiveInstances, [NewInspectedInstance](const UFlowAsset* ActiveInstance) |
| 881 | { |
| 882 | return ActiveInstance && ActiveInstance == NewInspectedInstance; |
| 883 | }); |
| 884 | |
| 885 | if (!ensureMsgf(bIsNewInstancePresent, TEXT("Trying to set %s as InspectedInstance, but it is not one of the ActiveInstances"), *NewInspectedInstance->GetName())) |
| 886 | { |
| 887 | NewInspectedInstance = nullptr; |
| 888 | } |
| 889 | } |
| 890 | |
| 891 | InspectedInstance = NewInspectedInstance; |
| 892 | BroadcastDebuggerRefresh(); |
| 893 | } |
| 894 | |
| 895 | void UFlowAsset::BroadcastDebuggerRefresh() const |
| 896 | { |
no test coverage detected