Hello, I try to get my two variable (NumLang and TestSetUp) into my blueprint. But when i use UPROPRETY, my compilation fail.
Error 1: Severity Code Description Project File Line Suppression State
Error MSB3075 The command ““D:\Programme File\Epic Game\Epic Games\4.13\Engine\Build\BatchFiles\Build.bat” TheUniverseEditor Win64 Development “G:*****************.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command. ****** C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 41
Error 2: Severity Code Description Project File Line Suppression State
Error code OtherCompilationError (5)
My code :
#pragma once
#include "Section_1/GameSetUp.h"
#include "GameFramework/Pawn.h"
#include "TestPawnBis.generated.h"
UCLASS()
class THEUNIVERSE_API ATestPawnBis : public APawn
{
GENERATED_BODY()
public:
// Sets default values for this pawn's properties
ATestPawnBis();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
UPROPERTY(BlueprintReadWrite, Category = "Test")
int NumLang = 0;
UPROPERTY(BlueprintReadWrite, Category = "Test")
GameSetUp TestSetUp;
};
As Mookiez said, you probably need to set your “int” as “int32”
I’m also guessing that “GameSetUp” is a class you’ve defined, in which case you’ll need to include the “*” to make your variable a pointer rather than a direct assignment:
But I’ve seen this error a few times with my project, and it’s usually not actually a problem with VS or my code; rather, it’s a Windows permissions error. Just shut down VS and reopen your project. Try your build again and you’ll likely have no problems.
You shouldn’t need the “class” marker, and TSubclassOf would be used for a delayed load of the object. The proper format for that would be:
TSubclassOf<GameSetUp>
But now that I think of it, you should have a prefix on your classname. Is this an actor or an object? If it’s an actor, your class is probably called “AGameSetUp”, if it’s a uobject it’ll be “UGameSetUp”.
If it’s a class, how is it declared in GameSetUp.h ?
If you’re getting new/different errors on your build, please post the content of the Output tab after the build. The Visual Studio errors tab can be misleading because UE4 uses so many macros and has its own structure.