[BUG] Compiling issues
ImBlackMagic opened this issue · 2 comments
Bug Description
Compilation errors:
RoomLevel.h(62): [C2664] 'bool IsValid(const UObject *)': cannot convert argument 1 from 'URoom *const ' to 'const UObject *'
- All validations functions in that file throw a compilation error
ProceduralLevelStreaming.cpp(98): [C2653] 'FLogCategoryLogProceduralDungeon': is not a class or namespace name
- All logging calls in that file throw a compilation error
Technical informations
- OS: Windows 10
- Unreal: 5.1
- Plugin Version: 2.1.1
- Compiler: Using Visual Studio 2022 14.34.31933 toolchain and Windows 10.0.22621.0 SDK
Expected behavior
Project doesn't compile
Screen Shots
Proposed Fix
- Add
#include "Room.h"
in theRoomLevel.h
file - Add
#include "ProceduralDungeonLog.h"
in theProceduralLevelStreaming.cpp
file
After doing that it compiles for me
Thank you for your report!
I missed those ones, maybe because I'm using VS2019...
I don't really like adding Room.h
inside another header file...
I think a better solution would be to modify the culprit code with one of those ways:
- changing all
IsValid(Room)
bynullptr != Room
, this will not checkIsPendingKill
anymore but will be faster in case of heavy duty code (IsPendingKill
is not a simple boolean check) - moving the function definitions in the cpp instead, and removing the
FORCEINLINE
on them (I don't think they are really inlined currently since UE adds a bunch of new things with the macro)
For the ProceduralDungeonLog.h
, I totally agree. I will add it soon.
No problem, I will be closing the issue as you are already aware of the problem.
I'd also suggest changing to VS2022 if it's not inconvenient to you, our team has had plenty of issues with VS2019 to the point we told everyone to purge the thing from their systems and use only VS2022.
If you develop for unreal fairly frequently I'd suggest giving JetBrains Rider a look, they have a free month trial, it's a whole lot better than using vanilla Visual studio, and it works much better with version control (more prominently Plastic and Perforce, haven't tested Git as it doesn't have a locking functionality on binary files, and you need git lfs to manage binary files anyway)