[PAPER2D] How to Open Blueprints in C++

Hello, I fancy myself as more of a coder than someone who uses module-based programming, such as scratch, or whatever language this is on UE. How do I access the blueprints in code?

Start with UE coding tutorials so that you get familiar with the framework, you have a lot of information to absorb.

The short answer of how it all works is that UE is a C++ framework that handles memory management for you, it also comes with a graphics API and a game API, and everything in-between. It’s a cross-platform framework as well, so what you write will work on everything. If you stick to the UE framework and the way it works your code becomes immediately portable.

You can use class, function and property specifiers to expose select parts to blueprints through reflection, which means you can either make everything in blueprints, make it in C++ or do a mixture. A common good arrangement is to do all of your base classes in C++ where you have more flexibility, and then use the results in blueprints to create gameplay. If you need to access something that only C++ can do (such as dynamic loading of assets at runtime) then you just add it to the parent class.

If you want to know how a particular node works, you can double-click it to open its header in Visual Studio.

UE also supports hot reloading, so you can make changes, build it and your project will update and reflect most changes automatically without reloading. The editor is particularly useful for creating scaffolds of each new class so you don’t have to write the all of the class declaration guff.

The only extra thing to this is that you need to learn what the framework macros used in C++ do. That’s where you begin reading tutorials, which I’d highly recommend over learning it the hard way a bit at a time.

Oh yeah, and to actually get started open the editor, make a new project, go to the File menu and add a new class. Base it on AActor or whatever. That’ll create the VS project and link up the read-only UE source, which you can then read through and search (and include).