BuildEnvironment = TargetBuildEnvironment.Unique

I am testing 5.4.0 preview 1 from source.

When compiling the project, I get an error about bStrictConformanceMode which has to do with the project changing/interfering the engines files (I don’t remember the exact error message).
The log said to add BuildEnvironment = TargetBuildEnvironment.Unique; in the target.

The project is now compiling, but this wasn’t needed in 5.3.2.

Does anyone know why this change to the target was needed in 5.4?

Since it is compiling, it is no big deal, I am just curious why.

2 Likes

I don’t have a full understanding of whats up here, but noticed there are a bunch of other warnings
my build.cs had DefaultBuildSettings = BuildSettingsVersion.V2
Checking source, it seems v3 was introduced 5.something and 5.4 has a new default of DefaultBuildSettings = BuildSettingsVersion.V4 - changing my build.cs to this value resulted in a working build.

6 Likes

Hi Thanks for the reply :grinning:

Using DefaultBuildSettings = BuildSettingsVersion.V4; I was able to remove BuildEnvironment = TargetBuildEnvironment.Unique; and it compiled without error.

I had a second project I couldn’t get to compile at all. It was getting a ton of errors. This fix it as well. :+1:

2 Likes

Where did you make this changes? Do you have to use Visual Studio?

I think it is recommended to use Visual Studio, but there may be other IDEs that are compatible with Unreal engine. But you do need to use a C++ project.

All C++ projects have a source folder and the first files in this folder are the *.Target.cs files, this is where you would add these lines of code.

Here are some examples for a project I names Sarlack.

(The log in the compiler said to use V5, so I switched it from V4 to V5 and everything still compiled OK.)

image

4 Likes