C++ v Blueprints

I’m trying to understand how C++ is used if you opt for that method as opposed to blueprints. Is it like Ogre?

I don’t like Blueprints but at least you’re working closely with the other visual tools in the editor. If you opt for the c++ route, the editor closes and you’re face with a wall of c++ code.

Is it a case of one extreme or the other here?

Thanks

Hello ,

You can utilize both C++ and Blueprints no matter what option you chose when you create your game.

If you choose blueprints you should be able to go to the file drop down and select “Add Code to Project” Then you will select your base class to build from and The editor will generate the Visual Studio project files automatically.

If you create a game from C++ then yes, the editor closes and you are faced with a wall of C++ code. Compile the code and then choose “Build->Debug” or “Build->Run Without Debug” from Visual Studio. Either option will open up the editor. The difference will be Run without debug will allow you to continue editing code and hot reload the editor’s code when you compile.

Thanks. When you build and editor opens up, can you then use the tools in the editor for example for creating materials and so on? Or does that all have to be done in C++?

The Built Editor is 100% the normal UE4 Editor, so yes, you have ALL the capabilities. You can think of the C++ project as an extension of the editor. All the code you write becomes available in the editor (upon compilation). You can even reference assets from the editor in your code (though I don’t suggest doing that, use a variable you can set in the editor instead of hard coding an asset path).

One of the tutorials that really helped me in a lot of ways was this one:

https://docs.unrealengine.com/latest/INT/Videos/index.html?category=Programming

it is a great introduction to UE4 from a C++ developer’s point of view AND even demonstrates methods of utilizing blueprints from the C++ objects you’ve created.

the editor doesn’t even need to close, as you can compile your code with the editor open and reload it (given you only compile your game code, not the engine)

This is great…just what I was looking for. Thanks!