Can't save blueprint with custom component. Graph is linked to private object(s) in an external package

Can’t save …/…/…/…/UnrealProjects/SixenseAPI_Project/Content/Weapons/AssaultRifle/BurstRifle/BurstRifle.uasset: Graph is linked to private object(s) in an external package.
External Object(s):
Item_Grip
BurstRifle_C_1
PersistentLevel
World_2
/Engine/Transient

Try to find the chain of references to that object (may take some time)?

I have written code for a custom component in my game module. Item_Grip is one such component. My actor adds this component in its constructor, specifying itself as the outer. However, if I try to make a blueprint of this class and save it, it get the error. I would really prefer to make blueprints of this class rather than several subclasses in code.

I’m having the same issue. Have you been able to find a solution? I get this error when tryint to save a level in which I spawned a custom actor that contains my custom object (a UCanvasRenderTarget2D subclass).

To answer my own question, I had to create the canvas object like this:

RenderTarget2D = ObjectInitializer.CreateDefaultSubobject(this, TEXT(“RenderTarget”));

Instead of this:

RenderTarget2D = (UCanvasRenderTarget2D *)UCanvasRenderTarget2D::CreateCanvasRenderTarget2D(this, UCanvasRenderTarget2D::StaticClass(), 256, 256);

Now I can save my level.

And now the editor crashes on launch and can’t load my level…

MachineId:7B1410024B5F8A1172BFD092EB2F8DC9
EpicAccountId:0c439985bc904ae8aa673c0929588869

Unknown exception - code 00000001 (first/second chance not available)

Assertion failed: !GIsRoutingPostLoad [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp] [Line: 799]
Cannot call UnrealScript (CanvasRenderTarget2D //Game//Maps//Example_Map.E

KERNELBASE + 24684 bytes
UE4Editor_Core + 3140052 bytes
UE4Editor_Core + 1614600 bytes
UE4Editor_Core + 1494994 bytes
UE4Editor_CoreUObject + 1478760 bytes
UE4Editor_Engine + 16702051 bytes
UE4Editor_Engine + 2233882 bytes
UE4Editor_Engine + 9088120 bytes
UE4Editor_CoreUObject + 934894 bytes
UE4Editor_CoreUObject + 1386885 bytes
UE4Editor_CoreUObject + 1467036 bytes
UE4Editor_UnrealEd + 2831250 bytes
UE4Editor_UnrealEd + 2761581 bytes
UE4Editor_UnrealEd + 2678685 bytes
UE4Editor_UnrealEd + 6364224 bytes
UE4Editor_UnrealEd + 3235445 bytes
UE4Editor_UnrealEd + 3234600 bytes
UE4Editor_UnrealEd + 6585037 bytes
UE4Editor_UnrealEd + 6358174 bytes
UE4Editor!GuardedMain() + 285 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:123]
UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

Have you found a workaround yet? i have the exact same problem.

edit: the solution that worked for me is to go back to your original code except mark the canvas object as UPROPERTY(Transient) which will stop it interfering with the save process.

the bad news is the map you saved it on as a subobject is now broken and you’ll have to start again. You could possibly recover the map but that’s beyond me.

Your level is probably unrecoverable (without engine modification.) However, setting the uproperty to transient and instantiating it in post init props or begin play will fix your issues for future maps.

I have the same problem. Seems like the level and blueprint systems are very fragile. This will not be the first time our content team will have to checkout older versions and try to recover as much as possible. Anyhow thanks for sharing!