by rtpg · 4y ago · 0 comments
What I really really want (and maybe I can have this easily!) is to be able to inline some C++/Rust inside a blueprint. Sometimes there are expressions that would be way easier to type out, or some tricky state logic that I can express with prose more nicely than with arrows.
I imagine the "serious" thing to do is to build out the C++ in some other file and then do the thing with my blueprint, but imagine if we had a completely smooth gradient for upping the tooling from blueprint to C++ when needed!
https://www.unrealengine.com/marketplace/en-US/product/magic...
UFUNCTION(BlueprintCallable) // This is a purely C++ function that is exposed to Blueprints and can be called from blueprints
UFUNCTION(BlueprintNativeEvent) // This can be implemented in C++, Blueprint, or both (in the Blueprint implementation, call the Parent method and it will run the C++ function and then run the Blueprint function)
UFUNCTION(BlueprintImplementableEvent) // This is a purely Blueprint function (though it is defined in the C++ header) that can be called from C++.
I believe there may also be some funky reflection code you can create to invoke Blueprint functions from C++, but there's very little reason for that as BlueprintImplementableEvent does that in a cleaner way.
Source:
https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScrip...