Cannot use "Add Instanced Static Mesh"

I am unable to use “Add Instanced Static Mesh Component” from within a macro library. My macro is as follows:

Simply swapping this macro out for a direct node of “Add instanced…” works as expected.

If I right click and “Expand Node” on the macro inside of a blueprint, the node changes to “Add Component” instead.

217576-mesh-2.png

Is there something obvious I am missing? Or is this just not supported?

Did you try connecting anything to the Relative Transform pin? If left empty (as shown on the screenshot) it will cause an error to be thrown.

Yes. Actually my macro has ‘manual attached’ enabled (must have unticked when doing this screenshot). I don’t believe a relative transform is required - but it had no impact when I added one.

If you trying to add bunch of instanced meshes, you must add InstancedMeshComponent first, then get it and call AddInstance from it.

I created the exact same macro on a blank blueprint as you have shown on the screenshot and I was able to instance the mesh both from within and outside the macro. Are you completely sure that this is the point where the error occurs? Have you tried if it works on a blank blueprint and connected just to construct or begin play?

I think it’s some kind of editor / blueprint bug. I’ve created the same macro 3 times, 3 different names. One of them worked. Right click → Expand, and the working one changed to the correct node, the other 2 changed to “Add component”.

Adding from a standard macro works consistently - but using the macro library is causing problems.

I created a blank project, and replicated the macros - things worked fine.

I think it’s an editor bug. I noticed this when duplicating the macros. They seem to be dependent on a specific other node existing in the blueprint. Here’s the best example I had:

Notice the first connected node is currently “Add Instanced Static Mesh Component”, and there’s 1 floating orphaned node.

I select the orphaned node, hit delete, and look what happens to the connected node: