Graph is linked to private object(s) in an external package

I got the error:

Can’t save /…/…/.uasset: Graph is linked to private object(s) in an external package.

External Object(s):

/Engine/Transient

I know a lot people already asked this question, I looked through a Lot if them I found, but it didnt solved my Problem.
I dont find anything when I search for “Transient” (or “transient”).

My Setup is the following:

  • I have a c++ Class MyActor extends AActor
  • I made a Blueprint based on MyActor called MyActorBP
  • I have a c++ Class MyObject extends UObject
  • all Files are in the same Folder
  • MyObject has following function:

h:

public: 
   UFUNCTION(BlueprintPure, Catergory="MyObject")
   static UMyObject *MakeMyObject();

cpp:

UMyObject *UMyObject::MakeMyObject()
{
   UMyObject *myobj = NewObject<UMyObject>();
   return myobj;
}

Inside the Blueprint I have access to MakeMyObject() and everything is working fine.
But when I do any changes in the Code and than go back to the Blueprint and want to save it,
I get the error written above.

Temporary Fix is to delete the node MakeMyObject and real it again, or go to File>Refresh All Nodes.

But this cannt the the final way.

How can I fix this error? Help me please.

Hello TheRealSpook,

I have a few questions about this issue. First, why are you having the UMyObject class create another instance of itself? This seems like a setup for an infinite loop. Secondly, are you sure that’s your actual code? Those “MyObject” class specifiers would need to be “UMyObject” if you’re declaring this as a child of UObject and having it be part of the reflection system. Also, how are you going about calling this function in blueprint despite it not being a UFunction? Having all of the code for these two classes would be helpful.

Oh you are right, I corrected my example.

I did write the example, which has the elements I have in my code, cause my classes are actually a bit bigger and more complex.

MyObject holds Data to do some complex calculations. And I thought I can in the blueprint create an instance of that class to do the calculations whenever I need these.

Well my this Error isn’t fixed, but I found out that the whole idea to work with UClass wasn’t the right way.

I looked how the FVector works, cause I wanna do something similar.
So the Solution for me was to work with struct instead UClass.

I found the issue, it was due to using Dispatchers in the Level Blueprint, instead of housing them in a “proxy” actor located in the level.

Ver 4.22