UMulticastDelegateProperty* UK2Node_ActorBoundEvent::GetTargetDelegateProperty() { auto ActualEventSignatureClass = FActorBoundEventHelper::GetSignatureClass(this); if (!EventSignatureClass && ActualEventSignatureClass) { EventSignatureClass = ActualEventSignatureClass; } UMulticastDelegateProperty* TargetDelegateProp = Cast<UMulticastDelegateProperty>(FindField<UMulticastDelegateProperty>(EventSignatureClass, DelegatePropertyName)); // If we couldn't find the target delegate, then try to find it in the property remap table if (!TargetDelegateProp) { UMulticastDelegateProperty* NewProperty = Cast<UMulticastDelegateProperty>(FindRemappedField(EventSignatureClass, DelegatePropertyName)); if (NewProperty) { // Found a remapped property, update the node TargetDelegateProp = NewProperty; DelegatePropertyName = NewProperty->GetFName(); EventSignatureClass = Cast<UClass>(NewProperty->GetOuter()); CachedNodeTitle.MarkDirty(); } } return TargetDelegateProp; }
UFunction* UK2Node_DelegateSet::GetDelegateSignature() { UMulticastDelegateProperty* DelegateProperty = FindField<UMulticastDelegateProperty>(DelegatePropertyClass, DelegatePropertyName); if( !DelegateProperty ) { // Attempt to find a remapped delegate property UMulticastDelegateProperty* NewProperty = Cast<UMulticastDelegateProperty>(FMemberReference::FindRemappedField(DelegatePropertyClass, DelegatePropertyName)); if( NewProperty ) { // Found a remapped property, update the node DelegateProperty = NewProperty; DelegatePropertyName = NewProperty->GetFName(); DelegatePropertyClass = Cast<UClass>(NewProperty->GetOuter()); } } return (DelegateProperty != NULL) ? DelegateProperty->SignatureFunction : NULL; }