//------------------------------------------------------------------------------ bool UBlueprintBoundEventNodeSpawner::IsBindingCompatible(UObject const* BindingCandidate) const { bool bMatchesNodeType = false; if (NodeClass->IsChildOf<UK2Node_ComponentBoundEvent>()) { UObjectProperty const* BindingProperty = Cast<UObjectProperty>(BindingCandidate); bMatchesNodeType = (BindingProperty != nullptr); } else if (NodeClass->IsChildOf<UK2Node_ActorBoundEvent>()) { bMatchesNodeType = BindingCandidate->IsA<AActor>(); } const UMulticastDelegateProperty* Delegate = GetEventDelegate(); if ( !ensureMsgf(!FBlueprintNodeSpawnerUtils::IsStaleFieldAction(this), TEXT("Invalid BlueprintBoundEventNodeSpawner (for %s). Was the action database properly updated when this class was compiled?"), *Delegate->GetOwnerClass()->GetName())) { return false; } UClass* DelegateOwner = Delegate->GetOwnerClass()->GetAuthoritativeClass(); UClass* BindingClass = FBlueprintNodeSpawnerUtils::GetBindingClass(BindingCandidate)->GetAuthoritativeClass(); return bMatchesNodeType && BindingClass->IsChildOf(DelegateOwner) && !FObjectEditorUtils::IsVariableCategoryHiddenFromClass(Delegate, BindingClass); }
//------------------------------------------------------------------------------ bool UBlueprintBoundEventNodeSpawner::IsBindingCompatible(UObject const* BindingCandidate) const { bool bMatchesNodeType = false; if (NodeClass->IsChildOf<UK2Node_ComponentBoundEvent>()) { UObjectProperty const* BindingProperty = Cast<UObjectProperty>(BindingCandidate); bMatchesNodeType = (BindingProperty != nullptr); } else if (NodeClass->IsChildOf<UK2Node_ActorBoundEvent>()) { bMatchesNodeType = BindingCandidate->IsA<AActor>(); } const UMulticastDelegateProperty* Delegate = GetEventDelegate(); UClass* DelegateOwner = Delegate->GetOwnerClass()->GetAuthoritativeClass(); UClass* BindingClass = FBlueprintNodeSpawnerUtils::GetBindingClass(BindingCandidate)->GetAuthoritativeClass(); return bMatchesNodeType && BindingClass->IsChildOf(DelegateOwner) && !FObjectEditorUtils::IsVariableCategoryHiddenFromClass(Delegate, BindingClass); }