Hello, I’m working with a Macro library to make some animations, and I need to use a local Wildcard variable to set a vector2D. However, even though I set the Wildcard variable in every path of my macro, I keep getting error:
The type of Variable generated from expanding Text Slide is undetermined. Connect something to Local Wildcard generated from expanding Text Slide to imply a specific type.
Where Text Slide is my macro. Am I using this wrong?
Here’s the blueprint for reference, but it’s a little messy:
Edit: I was also able to recreate the issue when creating a Macro in a normal Blueprint.
I faced the same issue a long time ago and I still haven’t found an answer (haven’t searched that much tbh). The only way to make it work is to wrap it in a macro. Then it works. It’s silly but it works.
This solution works, but it’s important to do it in this order:
Create the macro as shown in MMMarcis’ second picture
Ensure the macro is NOT connected to anything (For example if you selected the Local Wildcard node and right clicked->collapse to macro, disconnect all outputs from the macro instance)
Connecting the new macro to the variable pin in the Assign node and THEN connecting the value into the Assign node does not work. You must connect the value on the assign node first and then drag FROM THE MACRO TO THE ASSIGN NODE. It is important that you drag from the macro to the assign node rather than connecting it backwards from the Assign node to the macro.
You should be good after those 3 steps. I’ll add on extra tip, though if you’re using another node other than Assign. You want to make sure that the node you’re connecting the new macro to already knows what variable type it is taking. In my previous example, that node would be the Assign node and you told it what variable it was taking by connecting something to the value pin first. Then, drag from the macro output pin to the node into the variable pin so the macro output pin can update to the proper variable type.