Creating C++ Base ClassΒΆ
In Contents -> Blueprint. rename Grabber to BP_Grabber and do the same with CuttableTree
Check the parent of BP_Grabber by either checking Class Settings or looking at the top right and we should see that the parent is Scene Component
3. Ensure Windows SDK is installed: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/
Right click and create new C++ class and choose Scene Component and name it Grabber. Click on Public
Change the code BlueprintsToCppSourceBlueprintsToCppPublicGrabber.h
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class BLUEPRINTSTOCPP_API UGrabber : public USceneComponent
Add Blueprintable:
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent), Blueprintable )
Ctrl-Shift-B to build the project and we should see it in the Content Browser. (In some versions of UE4 it may require rebooting)
In the BP_Grabber BluePrint, go to Class Settings and change Parent Class to Grabber
Do the same thing with BP_QuestManager. Check that parent is Actor so create an Actor C++ Class named QuestManager. Note that this time we do not need to add Blueprintable because Actor is already Blueprintable. Now make parent of BP_QuestManager to be QuestManager