Use Camera Rig Rail in C++

I have a camera that follows the player as they move around certain sections of the map via a Camera Rig Rail. At the moment I’m trying to create a variable that references a Camera Rig Rail that the level designer can set while the actor is in the level. However when I try to make a variable that would do this I get “Unrecognized type ‘ACameraRig_Rail’ - type must be a UCLASS, USTRUCT or UENUM”

I have this working in blueprints, I just created a variable and set it to “Camera Rig Rail” reference, which I can then use in blueprints, but here it’s not working.

RailCamera.h file

#include "ThirdPersonCamera.h"
#include "RailCamera.generated.h"

UCLASS()
class [PROJECTNAME] ARailCamera : public AThirdPersonCamera
{
	GENERATED_BODY()
public:
	ARailCamera();

	// Camera Rail
	UPROPERTY(EditAnywhere)
	class ACameraRig_Rail* CamRail;
}

Currently there is nothing in the .cpp file that accesses the CamRail variable.

Include the “CinematicCamera” module to your Build.cs file. It will work, but I’ve still had problems implementing Camera Rig Rails in C++. Most functions and members arent accessible and there’s bare to nothing that I can do with them. Haven’t found a go around yet.