BP_MotionController missing SteamVRChaperone component. Cant find /Script/SteamVR

I created a new Project based on the new Virtual Reality template using 4.13, and every time I start up the editor I get the following error log: “/Game/VirtualRealityBP/Blueprints/BP_MotionController: Can’t find file for asset /Script/SteamVR”. I’m not sure when this started happening, but if I create a new project now based off of the VR template, I don’t have the same issue.

When this happens, the BP_MotionController blueprint is unable to compile, and I noticed that the SteamVRChaperone component that used to be there no longer exists. I have to manually re-add this component to BP_MotionController, then replace the SteamVRChaperone component getter in SetupRoomScaleOutline with the new one to get the blueprint compiling again. Everything then continues to work, until I close the editor and re-open it, where the same problem resurfaces. Yes, I have saved everything.

I did convert this to a C++ project, and I’ve got a single base station in “A” mode. I’ve tried making sure that SteamVR is started, and the HMD, both controllers, and the basestation were all connected and Ready before starting the project up. I also tried including “SteamVR” and “SteamVRController” in PrivateDependencyModuleNames in my build rules.

Any idea what might be going on here?

For anyone else that comes across this, I was able to fix this by inheriting BP_MotionController from a parent C++ class that has a BlueprintReadOnly USteamVRChaperoneComponent in it. USteamVRChaperoneComponent can be found in “Classes/SteamVRChaperoneComponent.h”.

Hi I’ve got the same issue but don’t really understand what you did.

Any chance you could explain?

Thanks

Did you also extend the MotionController blueprint from c++ like I did? I was never quite sure what initially caused the problem. Well, regardless in the parent MotionController c++ class I did the following (I stripped out a bunch of code from my own, so the below is untested and an approximation):

MyMotionController.h
#pragma once

#include "GameFramework/Actor.h"
#include "Classes/SteamVRChaperoneComponent.h"
#include "MyMotionController.generated.h"


UCLASS()
class BEAT_API AMyMotionController : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	AMyMotionController();

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;
	
	// Called every frame
	virtual void Tick( float DeltaSeconds ) override;

	//////////////////////////////////////////////////////////////////////////
	// Components

	UPROPERTY(BlueprintReadOnly, Category = "Steam")
	USteamVRChaperoneComponent* SteamVRChaperone;
};

MyMotionController.cpp

#include "MyGame.h"
#include "MyMotionController.h"


// Sets default values
AMyMotionController::AMyMotionController()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	SteamVRChaperone = CreateDefaultSubobject<USteamVRChaperoneComponent>(TEXT("SteamVRChaperoneComponent"));
}

// Called when the game starts or when spawned
void ABeatMotionController::BeginPlay()
{
	Super::BeginPlay();
}

// Called every frame
void ABeatMotionController::Tick( float DeltaTime )
{
	Super::Tick( DeltaTime );
}

Thanks, worked perfectly in my case!

For those getting the compiler error of “undefined USteamVRChaperoneComponent” and the #include “SteamVRChaperoneComponent.h” not being found, see solution here: Adding USteamVRChaperoneComponent - Programming & Scripting - Epic Developer Community Forums

Still happend on 4.16…But only happend if I reference this blueprint from some widgets…its really strange…what chaperon has to do with the widgets? :expressionless: