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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Uproperty not defined

Hi, I'm having trouble getting Uproperty to work for a pawn. when I try to build and run my code commenting UPROPERTY() out everything runs fine but when UPROPERTY is not commented my code fails and it seems that it is not defined. I'm trying to follow this tutorial on youtube. I think I need to include something but I don't know what, looking at the documentation isn't helping me. here is the code:

 // Fill out your copyright notice in the Description page of Project Settings.
 // able to read input
 #pragma once
 #include "CoreMinimal.h"
 #include "GameFramework/Pawn.h"
 #include "PlayerCam.generated.h"
 class TUTORIAL_API APlayerCam : public APawn
     // Sets default values for this pawn's properties
     UStaticMeshComponent* CubeMesh;
     class UCameraComponent* Cam;
     // Called when the game starts or when spawned
     virtual void BeginPlay() override;
     // Called every frame
     virtual void Tick(float DeltaTime) override;
     // Called to bind functionality to input
     virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
     void MoveForward(float Value);
     void MoveRight(float Value);


Product Version: UE 4.20
more ▼

asked Sep 02 '18 at 05:48 PM in C++ Programming

avatar image

3 1 2

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

1 answer: sort voted first

this could be cause by some wrong includes within your solution project. your code is correct event though some code should probably be protected instead of being public but not a reason for your code to fail.

Check if all the following folders are part of your solution: /PATH/TO/SOLUTION/ProjectName/Intermadiate/Build/PLATFORM[/B4D820EA{If you are on Linux}]/AnyFolderThatContainsInc/Inc/AnyFolderHere

Some missing precompiled headers may cause this issue.

more ▼

answered Sep 02 '18 at 06:41 PM

avatar image

263 2 4 5

avatar image Kiyoshi7 Sep 02 '18 at 07:47 PM

thanks , but how can I do that in visual studio? also I have an actor that is using UPROPERTY and its not having any problems running

avatar image TheDreamCatcher Sep 02 '18 at 07:52 PM

Can't believe I missed that... Remove the semicolons after UPROPERTY()

(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