Description

More details in slack:

[Link Removed]

Steps to Reproduce

We are currently unable to redirect a given UFUNCTION from one module to another when getting too specific regarding Package and Outer:

 

+FunctionRedirects=(OldName="/Script/ModuleA.ClassA.OldMethodName", NewName="/Script/ModuleB.ClassB.MethodName")

will be rejected by:

 

bool FCoreRedirects::AddRedirectList(TArrayView<const FCoreRedirect> Redirects, const FString& SourceString)
{
...
      if (NewRedirect.NewName.PackageName != NewRedirect.OldName.PackageName && NewRedirect.OldName.OuterName != NAME_None)
      {
         UE_LOG(LogLinker, Error, TEXT("AddRedirectList(%s) failed to add redirector, it's not valid to modify package from %s to %s while specifying outer!"), *SourceString, *NewRedirect.OldName.ToString(), *NewRedirect.NewName.ToString());
         continue;
      }

but the following will work but might match too many things:

+FunctionRedirects=(OldName="OldMethodName", NewName="/Script/ModuleB.ClassB.MethodName")

 

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-150469 in the post.

0
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions5.0
Target Fix5.4
Fix Commit29921758
Main Commit30028849
CreatedApr 27, 2022
ResolvedNov 24, 2023
UpdatedFeb 16, 2024