The CitySample project is not generated .sln

Hi everyone! I’m trying to generate a VS project from a CitySample project. When generating, the following error appears:

Targets with a unique build environment cannot be built with an installed engine.

I tried it for different versions of Unreal (5.3, 5.2, 5.1, 5.0) and the result was always the same.

The problem is not local. Other projects are generated without problems. I tried downloading the project from 0, it didn’t help.

3 Likes

I also encountered the same problem, leave a mark and hope someone can solve it

same issue

Delete CitySampleCookedEditor.Target.cs will solve your problem

4 Likes

Do you know why

Hi @qcy_6661 ,

I found it as a temporary solution when I was comparing different versions of the City Sample on UE 5.2 and UE 5.3 so I wasn’t having the exact awnser for this issue at that time.
But now I guess Epic Developers forgot to remove the target CitySampleCookedEditorTarget from City Sample when they released it to marketplace.
Because if you take a look at the output logs, you will find that the error from UnrealBuildTool is trigged by this condition:

if (Rules.BuildEnvironment == TargetBuildEnvironment.Unique && Unreal.IsEngineInstalled())
{
	throw new BuildException("Targets with a unique build environment cannot be built with an installed engine.");
}

And this condition happened when the function SetDefaultsForCookedEditor(bIsCookedCooker: false, bIsForExternalUse: true); being called inside CitySampleCookedEditorTarget.
That’s what I can see so far.
Hope it help.

7 Likes

Thank you