I’m getting the new behaviour (no module PCH used) but I can still include Engine.h and use GEngine without issue. Wondering what I’m missing?
Also, confused by 's solution. The GEngine pointer is declared in the same header as the UEngine class, so if you can’t include that header, then creating another extern declaration won’t help because without the class definition, you can’t access any members or methods anyway. The fact there are two Engine.h files doesn’t help much (Engine/Classes/Engine.h and Engine/Public/Engine.h). The former includes the class and GEngine, but it’s the latter that is the monolithic header which presumably we’re no longer supposed to be including.
Hi all, I have a similar issue to earlier in this thread, when i drop my plugins into a 4.15 project, visual studio cannot find any of the headers. Adding bEnforceIWYU = false; should help, right? but it doesn’t. Do I need to rewrite every class to upgrade? Ug.
EDIT. Yes, yes i do. rebuilding the plugins without the PCH is the way forward.
We’re getting the check() in DataChannel.cpp:1523 halting our game now when we remove some of our objects from the scene. The ‘bKeepReplicators’ input param is being set to true by (updated in 4.15) line 1707.
Any idea what use case this change was meant to fix and what we’re doing wrong ?
Yeah, it’s a little embarrasing the number of things we refer to as “Engine”. It’s all legacy, unfortunately. There’s the top-level Engine folder, then the engine module, then the giant Engine/Public/Engine.h header, then there’s the definition of UEngine and GEngine in Engine/Classes/Engine/Engine.h.
The way to include the latter (definition of GEngine and UEngine) is to include “Engine/Engine.h”.
Is IWYU meant for gameplay code? Everything I see is referencing engine and plugin/module compile times, but nothing specifically referencing code outside that scope. Is it worth going through the trouble and converting my project to IWYU?
At a guess, the library you’re wrapping has been configured/built to use C++ exceptions, which I believe are disabled by UBT in shipping builds.
Aside from possible compilation time reduction (it’s probably not going to be very significant at the project level), the main reason why the new approach is better practice is that if all headers are self contained, you avoid potentially annoying errors when including headers in multiple modules which have differing precompiled headers. So if your project is a single module or has minimal sharing of code across modules, then switching over probably isn’t a big deal.
Yeah, everything I have tried to get a command line dedicated server build has failed. Something has changed in the build chain and none of the different ways I have done command lines works anymore. I think it is specifically a problem bcause, like you, I don’t have the project under the engine directory.
Since I transitionned our project to UE 4.15 I experience very long time to build the project, even when I just update the CPP file.
In UE 4.14 in took less than 16 seconds…
Now it takes around 55 seconds.
What I changed in the code base was to remove the include to engine.h in our main header file, and replaced that line by CoreMinimal.h. I also added a few includes in the game code where needed.
I tried to play with the flag bEnforceIWYU in the build.cs file, but either true and false make the build last much longer…
I also have this error in the log of visual studio 2015 when I build:
This does not prevent the editor from successfully hot-reloading the code, but when I attach VS to the editor I can’t step in the code like I could do in UE 4.14.
We’ll revert to UE 4.14.3, waiting for things to behave better, maybe in a future patch?
Can’t move my project to 4.15 because of: “Couldn’t find parent type for ‘OST_WheeledVehicle’ named ‘AWheeledVehicle’ in current module or any other module parsed so far.”
Looks like problem in my OST_Character.h Can someone help please?
1>------ Сборка начата: проект: UE4, Конфигурация: BuiltWithUnrealBuildTool Win32 ------
2>------ Сборка начата: проект: OST_Game, Конфигурация: Development_Editor x64 ------
2> Creating makefile for hot reloading OST_GameEditor (no existing makefile)
2> Compiling game modules for hot reload
2> Performing full C++ include scan (no include cache file)
2> Parsing headers for OST_GameEditor
2> Running UnrealHeaderTool "C:\Users\Anna\Documents\Unreal Projects\OST_Game\OST_Game.uproject" "C:\Users\Anna\Documents\Unreal Projects\OST_Game\Intermediate\Build\Win64\OST_GameEditor\Development\OST_GameEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
2>EXEC : error : Couldn't find parent type for 'OST_WheeledVehicle' named 'AWheeledVehicle' in current module or any other module parsed so far.
2>C:/Users/Anna/Documents/Unreal Projects/OST_Game/Source/OST_Game/OST_Character.h(365): error : Unrecognized type 'AWheeledVehicle' - type must be a UCLASS, USTRUCT or UENUM
2>EXEC : error : UnrealHeaderTool failed for target 'OST_GameEditor' (platform: Win64, module info: C:\Users\Anna\Documents\Unreal Projects\OST_Game\Intermediate\Build\Win64\OST_GameEditor\Development\OST_GameEditor.uhtmanifest, exit code: OtherCompilationError (5)).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3075: Выход из команды ""Z:\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat" OST_GameEditor Win64 Development "C:\Users\Anna\Documents\Unreal Projects\OST_Game\OST_Game.uproject" -waitmutex" с кодом 5. Убедитесь в наличии достаточных прав для выполнения данной команды.
========== Сборка: успешно: 1, с ошибками: 1, без изменений: 0, пропущено: 0 ==========
I added in my OST_Game.project:
“Plugins”:
{
“Name”: “PhysXVehicles”,
“Enabled”: true
}
But nothing happen, still same: “Couldn’t find parent type for ‘OST_WheeledVehicle’ named ‘AWheeledVehicle’ in current module or any other module parsed so far.”
What else I might be missing? Some other dependancy? Is there some alrogythm/proven way to track down what I am missing? I can not figure anything from that error I get.