x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

adding USteamVRChaperoneComponent

in VRPawn.h I included:

 #include "Runtime/HeadMountedDisplay/Public/MotionControllerComponent.h"
 #include "Runtime/Steam/SteamVR/Source/SteamVR/Classes/SteamVRChaperoneComponent.h"

and declared

 UPROPERTY(BlueprintReadOnly, Category = "VRPawn")
 USteamVRChaperoneComponent* ChaperoneComponent;

and in the constructor of VRPawn.cpp I am adding the component with DefaultSubobject.

However I get the error "Unrecognized type: USteamVRChaperoneComponent"

What am I doing wrong? I think it might have something to do with the SteamVR plugin and the project.build.cs file, but I can't figure it out.

Product Version: UE 4.11
Tags:
more ▼

asked May 06 '16 at 06:31 PM in C++ Programming

avatar image

AllJonasNeeds
249 26 36 71

avatar image jacksparow May 15 '16 at 09:17 AM

Hi,Do you fix the problem ?I get the same error ,I also can't solve it.

avatar image AllJonasNeeds May 15 '16 at 09:22 AM

My temporary fix is using Blueprints instead of C++ for the Pawn class. But I will need to use C++ eventually, so I am still looking for a fix.

avatar image jacksparow May 15 '16 at 02:07 PM

I solved the problem in my project , I'm not sure if this method is suitable for your project.But I still tell you my method. Here is the step: 1. In My projectName.build.cs file I do this: PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore","SteamVR", "SteamVRController" }); 2.compile myproject. 3.Then I add the USteamVRChaperoneComponent* ChaperoneComponent in my Pawn.cpp file,and this time I don't get the error "Unrecognized type: USteamVRChaperoneComponent". Maybe you can try in this way!

avatar image jacksparow May 15 '16 at 02:28 PM

oh,I forget one step ,in the pawn.cpp file, you need #include "SteamVRChaperoneComponent.h"

avatar image YuriNK May 29 '16 at 06:23 AM

Thank you!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Big thanks to jacksparow for the answer: In the projectName.build.cs file I needed to include the Module Names "SteamVR" and "SteamVRController". (Private or Public DependencyModuleNames both work and I don't really know the difference to be honest.) For example:

  PrivateDependencyModuleNames.AddRange(new string[]
         {
             "SteamVR", "SteamVRController", "HeadMountedDisplay"
         });

Also everywhere I am working with a class from those modules, I need to include the .h file. In this case:

 #include "SteamVRChaperoneComponent.h"
more ▼

answered Jun 24 '16 at 03:43 PM

avatar image

AllJonasNeeds
249 26 36 71

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question