Hello everyone,
I tried resolving this problem for hours on end now, but I can’t.
Every time I try to open a project in unreal engine it says “This project could not be compiled. Would you like it to open it in Visual Studio Code?”
I currently run on MacOS 12.3 Monterey, 8GB of ram, and an Apple M1 chip if it matters.
My currently version of Unreal is 4.27.2, and the latest xCode version 13.3.
Until now I tried another version of Unreal (4.25), I tried changing project path, removing spaces, removing some characters that I thought were sketchy, I reinstalled all of them (Epic Games, Unreal, xCode and VS code) and still nothing. It won’t let me import a project, for example Bull&Cows from your course, or not even create a new one from scratch.
Here is the error details:
The project could not be compiled. Would you like to open it in Visual Studio Code?
Running Mono...
Found mono via known Mono.framework path
Running system mono/msbuild, version: Mono JIT compiler version 6.12.0.140 (2020-02/51d876a041e Thu Apr 29 10:44:55 EDT 2021)
/Users/Shared/Epic Games/UE_4.27/Engine /Users/Shared/Epic Games/UE_4.27/Engine/Binaries/Mac
Creating makefile for BuildingEscapeEditor (no existing makefile)
@progress push 5%
Parsing headers for BuildingEscapeEditor
Running UnrealHeaderTool "/Users/denis/Documents/Unreal Projects/BuildingEscape/BuildingEscape.uproject" "/Users/denis/Documents/Unreal Projects/BuildingEscape/Intermediate/Build/Mac/x86_64/BuildingEscapeEditor/Development/BuildingEscapeEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="/Users/denis/Library/Application Support/Epic/UnrealBuildTool/Log_UHT.txt" -installed
2022-03-24 14:19:39.290 UnrealHeaderTool[13827:65740] [UE4] Looking for binary: ../../../Engine/Programs/UnrealHeaderTool/Config/BinaryConfig.ini
LogInit: Display: Loading text-based GConfig....
Reflection code generated for BuildingEscapeEditor in 6.4580576 seconds
@progress pop
Building BuildingEscapeEditor...
Performing 7 actions (5 in parallel)
[1/7] Compile SharedPCH.Engine.ShadowErrors.h
In file included from /Users/denis/Documents/Unreal Projects/BuildingEscape/Intermediate/Build/Mac/x86_64/BuildingEscapeEditor/Development/Engine/SharedPCH.Engine.ShadowErrors.h:284:
In file included from /Users/Shared/Epic Games/UE_4.27/Engine/Source/Runtime/Engine/Public/EngineSharedPCH.h:572:
/Users/Shared/Epic Games/UE_4.27/Engine/Source/Runtime/Engine/Classes/Materials/Material.h:1279:26: error: variable 'LayerNames' set but not used [-Werror,-Wunused-but-set-variable]
const TArray<FText>* LayerNames = &LayersExpression->GetLayerNames();
^
1 error generated.
EDIT: Out of desperation, I proceeded to comment line 1279 in Material.h, and couple lines below that there was another one that used that variable so i commented that too. To my surprise it worked… but I don’t think that’s the right fix at all, so I’m still open to suggestions/help