Download

Switch between Blueprint & C++ ?

Hi

I just started looking at the Unreal 4 engine and it seems that you have a choice between working purely in c++ with the Unreal libraries, which seems like a huge task to master, OR working with blue prints which seems limited. I come from Unity, where I wrote c# scripts attached to objects.

I just wondered, is it possible to switch between the Blueprint and C++ ? For example, if you wanted to make a basic prototype using the blueprint editor, then open it all a text editor so you can customise / optimise the c++ code? Can you do stuff like this?

Presumably you can make custom blueprints in c++, for use in the blueprint editor?

cheers
Jason

Blueprint its a script system, it can call your C++ functions and receive events from C++.
Normally, you code complex functions in C++, and then assemble those to the final behavior in blueprints.
Blueprint compiles itself to something along the lines of unrealscript, and then runs in a virtual engine, but you cant use that intermediate code, as i think it compiles directly to bytecode, not readable code. My recomendation its that you should try to do all you can in blueprints, and when it starts to get complex, you start moving functionality to C++ functions in the code.

With C++ you can either program code that just runs as c++ or the code can be exposed to blueprints where you program classes/nodes/pins/functions/methods…ect.ect and it’s all usable by both blueprints and c++.

I only program in c++ and expose everything to blueprints, this way you have the power of c++ and the speed of C++ but the end user can customize everything and anything easily.

Not sure what you mean but if you are wondering if you can edit blueprint code you make as c++ you can’t. you need to rewrite a prototyped blueprint in to c++ code


You can how ever copy blueprint code paste it in a text editor and you’ll see that it wouldn’t be too hard to write a text parser that would take bp text and make c++ code from it.

It seems that the way to get a good balance between ease of use and flexibility is to program everything in c++ and expose to blueprints, as Saxonrah suggests.

Thanks very much for the help, guys!

It depends in each case actually. The strategy I use is to create every base classes in C++ and then just create a BP version from that which is the one I use in my maps. This way you can work in both worlds without too much effort.