Building error

Hi, my code shows error build when am using the macro “UPROPERTY(BlueprintReadWrite)” on a Float variable.

This is my program

    UPROPERTY(BlueprintReadWrite,  Category = "My Float")
	float myFloat;

This is the exact response i got while trying to build :point_down:t4:

MSB3073 "The command ““C :\file-directory\batchfiles\build.bat, \my project.uproject -WaitMutex -FromMsBuild” exited with code 6.”

please if you can help me resolve this issue i will appreciate :pray:

You are most likely trying to build from your IDE with debugging enabled, while live coding is enabled in the editor.

In the editor click the three dots near the bottom right corner if the screen and set “Enable Live Coding” to false. Then you can build from your IDE without Live Coding interfering.

I have checked it but my live coding is already set as “false” by default

The syntax for the UPROPERY macro is correct. (copied it into an actor). The problem is else where.
Perhaps you are putting it in a class that cannot be exposed to blueprints?

UCLASS(Blueprintable)

class MYPROJECT_API UMyObject : public UObject
{

GENERATED_BODY()

	UMyObject();

	UPROPERTY(BlueprintReadWrite,  Category = "My Float")
	float myFloat;

	UFUNCTION(BlueprintCallable, Category = "My Functions")
	void myFunction();

};

This is the program, i am having no issues with the UFUNCTION macro when building but only with the UPROPERTY

i just got it now the difference was that i did not specify it as public, i think the compiler was seeing it as a private file that was why it was unable to readWrite to it.

public:

	UMyObject();

UPROPERTY(BlueprintReadWrite, Category = "My Float")
	float mainFloat;

Anyway Thank you :slightly_smiling_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.