Macro libraries try to support guid-based renaming: when a specific macro is renamed blueprints using the old name will automatically point to the new name and work properly. However, this fixup happens after the blueprint has been loaded so it still outputs a hard error about a missing import. In practice this is worse than showing an error in the compile log because it leads to phantom errors that are invisible to in the editor but will stop a cook or build process from succeeding. This has happened multiple times internally and lead to confusing bugs that were fixed by resaving all of the blueprints referencing the macro.

Renaming a macro should either check out the blueprints referencing it and dirty them, or somehow stop the load error from happening

Steps to Reproduce
  1. Compile and load QAGame in the editor
  2. Open up PinTest_MacroLibrary and rename the macro PinTestingLibMacro to PinTestingLibMacroRenamed
  3. Save the macro library, note that it does not try to check out other blueprints using the library
  4. Close the editor and restart it
  5. Open the PinTest_Base blueprint. Note that it compiles fine
  6. Check your log, it will complain with this error message, which will stop a cook or package from succeeding if the BP is in use:

LoadErrors: Error: /Game/Blueprints/PinTesting/PinTest_Base : Failed import for EdGraph /Game/Blueprints/PinTesting/PinTest_MacroLib.PinTest_MacroLib:PinTestingLibMacro Referenced by export K2Node_MacroInstance /Game/Blueprints/PinTesting/PinTest_Base.PinTest_Base:EventGraph.K2Node_MacroInstance_4

Have Comments or More Details?

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

Login to Vote

ComponentUE - Gameplay - Blueprint
Affects Versions4.275.0
Target Fix5.0
Fix Commit18928212
Main Commit18932017
Release Commit18928212
CreatedFeb 4, 2022
ResolvedFeb 10, 2022
UpdatedJan 25, 2023
View Jira Issue