Description

The reimport process does not respect the new source path. Below is a workaround.

UE::Interchange::FAssetImportResultRef FReimportManager::ReimportAsync(UObject* Obj, bool bAskForNewFileIfMissing, bool bShowNotification, FString PreferredReimportFile, FReimportHandler* SpecifiedReimportHandler, int32 SourceFileIndex, bool bForceNewFile /*= false*/, bool bAutomated /*= false*/)
{
...
			else if (!PreferredReimportFile.IsEmpty() && !SourceFilenames.Contains(PreferredReimportFile))
			{
				// Reimporting the asset from a new file
				int32 RealSourceFileIndex = SourceFileIndex == INDEX_NONE ? 0 : SourceFileIndex;	//work around
				SourceFilenames[RealSourceFileIndex] = PreferredReimportFile;						//work around
				CanReimportHandler->SetReimportPaths(Obj, PreferredReimportFile, SourceFileIndex);
			}

Steps to Reproduce
  1. Prepare two texture assets with the same name in different paths
    ex.) 1:   v1/test.jpg
           2:   v2/test.jpg
  2.  Launch the editor
  3.  Drag & drop the source texture to the content browser to import
  4.  Drag & drop another source texture to the same folder to reimport

 

Result:

"Import Done" appears in the editor and the texture asset is marked as dirty. However, the re-import path is not updated and the content remains old.

 

Note:

In UE4, a similar operation can update the source path.

Have Comments or More Details?

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

0
Login to Vote

Fixed
Fix Commit24815747
CreatedMar 13, 2023
ResolvedMar 28, 2023
UpdatedSep 15, 2023
View Jira Issue