There are several ways that we can expose C++ functions to Blueprint, depending on what we need them to do. For our first example, we're going to make a simple function that we pass our float variable to and get an output from. Let's open up our C++ files and get started.
Using C++ functions in Blueprint
BlueprintCallable functions
For this first test, we're going to make a BlueprintCallable function. These work like the function calls we made back in Chapter 2, Programming Using Blueprints, with HandlePickedUp, except the actual code is in C++.
Our function will simply take a float and double it and then return that value. In the .cpp file, this is what the C++ code will look like for that:

In the .h file...