The first step in creating our collectible would be to actually create the class we are going to use:
- Navigate to File | New C++ Class and from there, in the Choose Parent Class window, select Actor and then click on Next:
- From the next window, set the Name property to CollectibleObject and click on the Create Class button to add it to the project and compile the base code:
- Once Visual Studio opens up, update CollectibleObject.h to the following:
#pragma once#include "CoreMinimal.h"#include "GameFramework/Actor.h"#include ...