| 402 | } |
| 403 | |
| 404 | void UFlowAsset::ValidateAddOnTree(UFlowNodeAddOn& AddOn, FFlowMessageLog& MessageLog) |
| 405 | { |
| 406 | // Filter unauthorized addon nodes |
| 407 | FText FailureReason; |
| 408 | if (!IsNodeOrAddOnClassAllowed(AddOn.GetClass(), &FailureReason)) |
| 409 | { |
| 410 | const FString ErrorMsg = |
| 411 | FailureReason.IsEmpty() |
| 412 | ? FString::Format(*ValidationError_AddOnNodeClassNotAllowed, {*AddOn.GetClass()->GetName()}) |
| 413 | : FailureReason.ToString(); |
| 414 | |
| 415 | MessageLog.Error(*ErrorMsg, AddOn.GetFlowNodeSelfOrOwner()); |
| 416 | } |
| 417 | |
| 418 | // Validate AddOn |
| 419 | AddOn.ValidationLog.Messages.Empty(); |
| 420 | AddOn.ValidateNode(); |
| 421 | MessageLog.Messages.Append(AddOn.ValidationLog.Messages); |
| 422 | |
| 423 | // Validate Children |
| 424 | for (UFlowNodeAddOn* Child : AddOn.GetFlowNodeAddOnChildren()) |
| 425 | { |
| 426 | if (IsValid(Child)) |
| 427 | { |
| 428 | ValidateAddOnTree(*Child, MessageLog); |
| 429 | } |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | bool UFlowAsset::IsFlowNodeClassInAllowedClasses(const UClass& FlowNodeClass, |
| 434 | const TSubclassOf<UFlowNodeBase>& RequiredAncestor) const |
nothing calls this directly
no test coverage detected