Failed building connection [...] Child Reference is not compatible with Parent (4.10, Blueprint)

I’ve been having problems on UE 4.10.4 where children actors of a parent aren’t being allowed to be used as their parents. The specific example I’ve got is one in which there is a ParentSpell actor, and a SpellTeleport (which is a child of the ParentSpell). My HUD includes a spellbook widget with a function to add a spell to it, which takes a ParentSpell reference as an input. So, here’s the blueprint where I spawn the SpellTeleport and try to add it to the spellbook:

This works fine with PIE. However, when I try to package the project, I get the following error:

LogBlueprint:Error: [compiler PathInt] Error COMPILER ERROR: failed building connection with 'Spell Teleport Reference is not compatible with Parent Spell Reference.' at  SpawnActor Spell Teleport 

As it turns out, if I cast the spawned SpellTeleport to a SpellTeleport and pass that along into the SpellBook, it withs with PIE as well as packaging the project. However, it generates some pretty nasty warnings (which by default won’t save the blueprint on compile):

LogBlueprint:Warning: [compiler PathInt] Warning Can't connect pins  As Spell Teleport  and  Incoming Spell : Spell Teleport Reference is not compatible with Parent Spell Reference.
LogBlueprint:Warning: [compiler PathInt] Warning 'ReturnValue' is already a 'Spell Teleport', you don't need  Cast To SpellTeleport .

It happens with all instances of my Spells that are children of ParentSpell, but it’s highly inconsistent. My SpellTeleport worked fine in a different blueprint doing the exact same thing, but it refused to work in this one no matter how many times I recreated it and every component surrounding it. (seriously, lots of man-hours on this, it was a frustrating weekend)

This issue appears to be the same as the one reported for UE 4.3 on https://answers.unrealengine.com/questions/71488/derived-blueprint-compiling-errors-and-inconsisten.html .

I’m uploading a copy of my project to mega right now. Would any staff members want a copy of it, preferably linked via direct/private message?

Hello,

You can provide the project to me via the forums at this link: https://forums.unrealengine.com/member.php?160394-Sean-Flint

I have reproduced this in your project, but have not been able to determine a way to reproduce it in a clean project.

Have you been able to reproduce the issue in a clean project on your end? If you haven’t attempted to do so, please go ahead and give it a shot and let me know what you find.

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

I can’t seem to get it to happen in clean projects, but the issue persists on my active project.

Not sure that I’d call it resolved, but I’ll let you know if I find a consist reproduction for fresh projects.

Hi Sean,
I’m facing same warning while packaging my project. Its not coming in the Editor (PIE) mode. I’ve a NPC Actor Class from which I made children. It was all working fine till I added more art assets in the child blueprints. And then the build gave me errors: Failed building connection with “NPC_Child_Actor reference” is not compatible with Parent NPC.

Hi Fieol,

Since your error is related to Packaging & Deployment and is occurring at a different time, please create a new post in the P&D section, and then post back on this thread with the link and I will assist you in the new thread.

Thank you

Hi there Sean Flint,

I am also getting this problem . apparently there have been multiple thread about this with no solution. is there a workaround?

I am using version 4.11.2.

Currently, we have been unable to reproduce this issue in a clean project. If you have solidified a repro case, please provide a detailed list of steps.

Other than that, at this time, as we have been unable to reproduce the issue, we are not aware of any workarounds.

This definitely have to do with some circular dependency of some sort. It is definitely not being able to reproduce. It’s one of those case where it only happens when there’s a big enough connection to create something that breaks.

I’m not sure how this should move forward… I’m not even sure what caused it in the first place. is there nothing that can be done? since you mentioned you could reproduce it in the package project.

Have you tried casting the resulting spawned actor to the class that it should be (as is listed in the original post with the second screenshot)? That was a workaround for my issue at the time, despite the warnings.

this works, but the warning is persistent… i guess it’s the only way to go now. still the best solution yet

For now, I’d recommend using that workaround that KovaaK provided.

However, after the next engine release, 4.13, if you are still experiencing this issue, please create a new thread and provide as much information as possible so that we can investigate it and attempt to get a report in.

Thank you!

Hey Sean, I have this same issue and the work around that KovaaK has given me does not fix the errors while packaging. I also do not have any repro steps but this is a very large project that my team has spent a lot of time on and we desperately need to build. The blueprint shows no compilations errors but the packaging process (regardless of platform) will say that there are compiler errors.

Using KovaaK’s workaround actually resulted in me getting a warning saying that the compilation of the blueprint was successful with warnings and at the same time an error saying there was an error with compiling that blueprint.

Edit: Using 4.10.4

Hello,

Could you please provide your full output log so I can take a closer look at the errors?

Thanks