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); }
"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.
In UE4, a similar operation can update the source path.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-179916 in the post.
0 |
Component | UE - Editor - Content Pipeline - Import and Export |
---|---|
Affects Versions | 5.1 |
Target Fix | 5.3 |
Fix Commit | 24815747 |
---|
Created | Mar 13, 2023 |
---|---|
Resolved | Mar 28, 2023 |
Updated | Sep 15, 2023 |