I’m creating a tool in which users can use Blueprint and C++ delegates. I’m wondering if there is a preferred or correct way to pass structs in Delegates.
I know technical difference between passing by value and by ref. I’m just wondering if any of these is better for Blueprints reflections system.
AI Chat scared me with this sentence: **Only trivial USTRUCTs should be passed by const& in dynamic delegates**.
So looking for more experienced devs opinion
As I haven’t received any answer here I tried to read all possible resources and chat with multiple bots. I ended up passing by value in DYNAMIC delegates and by reference in non Dynamic/Native ones:
Ahh ok, that might be the case. I declared all my Delegates in C++, so they are usable in C++ and Blueprints.
I haven’t tried BP event dispatcher for this case. Thanks for checking!