Blueprint verification errors are interesting. Especially if while cooking or saving the editor spits out “BP[…] contains invalid data” which leaves you pretty clueless.
You will find, though, that when debugging the editor, it breaks somewhere
Obj.cpp on an assertion in
Note that you need to have debug symbols installed.
There you’ll find a
UE_LOG call to a log category that is off by default.
Log LogCheckSubobjects All
you can enable it to see the error messages, something along the lines of:
? has a reference to default subobject (?) of ?.
What causes this error? For me it was the following:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly) UMyCustomObject* Object;
And then using a reference to
Object in a “Select” node in the child blueprint
of my C++ class. Why is this a problem? I marked the property as
but UE4 cannot control that I only read from a reference. I might as well change the
referenced object as much as I like and therefore write to it.
I fixed this by using
BlueprintReadWrite instead, as I didn’t have a good reason
for preventing writes. You may want to create special getter instead or something.
Written in 15 minutes