[bug?] find component in array from hit result

I try to find a static mesh component in an array from the “hit component” and it compiles and works perfectly fine with absolutely no problem whatsoever.
However, after closing and opening the editor again; the same event appears with an error saying: “COMPILER ERROR:” failed building connection with ‘Primitive Component Reference is not compatible with Static Mesh Component Reference (by ref).’

If i just redo the node and compile again it works perfectly fine again.

So… what’s the deal here?

I ended up using a separate mirrored “DisplayName” array and it was a successful workaround. But is still weird that it compiles, and then on restarting the editor shows an error and can just be recompiled if the node is redone.

Hi BENEROT,

Thank you for the report. I attempted to reproduce this but I couldn’t get your results. On reopening the editor, the node doesn’t produce a compile error for me.

Could you try reproducing this in a new project and then uploading it here?

Yup, happens just the same on a new project.

Steps to reproduce:

On construction script; on a for loop; Add static mesh component and add the return values to an array.

Then, on Event Graph: Add to find element in that same array using a get hit result. It will compile and work.

Finally, close and Open Unreal, and the event will now have an “ERROR!” and won’t be able to compile.

Hi BENEROT,

Sorry for the delay. I was able to reproduce this and I’ve created JIRA UE-35332. Our developer will be investigating the issue further. You can follow that link to check the status of the report.

Cheers,

TJ

Same here, hope you fix it soon.