Why won't my Macro compile?

Very simple and straightforward bug. I’ve cut down everything and identify the problem.
The node below should compile, but the macro refuses to.

Hey Frozenfire,

We’ve tried to compile just this macro in a blueprint and it doesn’t throw any errors. In your blueprint from your screenshot, when you get the compile error in the Compiler Results, if you click on the underlined Target in that line “Pin Target must have a connection”, the editor should focus on the node that is failing compile–is it taking you to this macro instead of the actual Target pin that is failing?


Yes it is taking me to that target. I redeleted and remake new function. Same result. There could he a chance I could have missed a small thing though I believe I am fairly sure ts not because this is a remaked macro to test out . Anything else I could check?

You might be right. I tried reproducing it, there wasn’t any error. But I 've been trying to resolve this for some time and couldn’t solve it. I’ll continue to work on it to see if it pops up again.

You probably haven’t wired the SCENE COMPONENT input in your graph where you use your macro. For macros, you need to wire the inputs before they can be resolved.

To clarify:

If you get this:

It’s because you’re using the macro somewhere, and haven’t wired the required inputs. Like so:

A macro is like putting the nodes directly in your graph, but makes it easier to reuse nodes over and over without having a billion nodes in one graph. Expanding the macro makes it clear why you get the error: