I would like to know if there is anyway to compile blueprint graphs into C++ files? Or any other text based language?
Yes there is, it’s still experimental and the code is all but not really for humans (by 4.10 it’s still experimental). The tool we will use is called Generate Native Code to activate it just follow these steps:
- Open a Blueprint
- Set a keyboard shortcut to a command called Generate Native Code as shown next
http://i.imgur.com/u5tuKJY.png
- Now a lil UI should popup that let’s you compile your BP into native code.
http://i.imgur.com/UTFvQDB.png
And voilà you got your code!
If you want to add the command as a tool and not just on a shortcut just add the following to your DefaultEngine.ini file.
[Kismet]
bNativeCodeGenerationTool=true
http://i.imgur.com/rAiTaTE.png
Note: that it’s experimental and it might break, all your code will translated in a series of states and loops with switches implementing the whole BP as a state machine.
Yup! It’s called “Blueprint Nativization”, which you can find in your project settings.
More information: Nativizing Blueprints | Unreal Engine Documentation
Wow, it’s awesome! Thanks!