Custom blueprint node internals
Hello to all,
This is my first posting here so be gentle:)
I'm trying to make custom node and so far everything was going really well but now I got tangled I feel at the very end.
I created custom plugin and then created module for that plugin and as a test I have created library with one function that just adds number to int and in my custom node I spawned function node got references to pins, connected everything and got value back that worked great.
It was basically done following logic here: https://wiki.unrealengine.com/Create_Custom_K2_Node_For_Blueprint
This was just test to figure out how things work and I'm happy to say it worked.
Now I tried to expand my node, I added option to create pins dynamically and idea is to add as much pins as you want (they are all of type bool as is the output) and I modified my function to now accept array of bools and I wanted to create array pass it to my function and then the function will do it's processing and for example if all bool pins are true it will return true else it will return false.
If I understood correctly now I can't just take all pins and connect it to my function since it's input parameter is array so I have to make array out of them and then pass that to my function. As far as I found the way to do this is to spawn intermediate node make array, connect all my node input pins to make array intermediate node and output of make array connect to input of my function so it can receive array and return bool. But that's not working for me.
This is just my function that receives just array of bool types, for now it returns just false but in future it will do more processing.
Here is how I connect everything in ExpandNode, It's a bit hacky because of different ways I was trying to do things, basically this worked ok when I spanwed function node and passed it simple int and got back result, but now that I want to pass it array trough MakeArray node it gives me an error.
And here is the error I get in blueprint when I connect everything:
Now I'm struggling with this solution of spawning intermediate MakeArray node and spawning intermediate function node, but perhaps there is simpler solution, can I take value from input pins and make array right in my node class and then pass array to the function directly without making node out of it and then just put value in to my node output pin or something like that. I Could not find in the documentation or examples how to get and put value in to UEdGraphPin or something in more detail that could shed light to my problem so I decided to try here.
I hope you can unstuck me:)
asked Oct 21 '15 at 10:18 AM in C++ Programming
This really took some time researching and just as I posted question I accidentally found solution so for future reference instead of:
It should be:
It was not (at least for me) 100% clear it should go like this from documentation but here it is for future refernce:)
answered Oct 21 '15 at 11:58 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here