If the UCLASS() is not exactly at line 8 i’ll get those 2 problems :
Thas means i can’t add any more includes before the UCLASS() or i’ll get compile erros.
I’ve already tried this solution, without sucess(it was the only one close to my problem that i could find) :
It’s important to notice that it has to be exactly at line 8.
That means if it’s at line 7th or less, 9th or more, it’ll still give me the problem.
Also, all types of lines count for the problem, comment lines and even blank lines count aswell.
That’s just intellisense not understanding the macro, if you actually try compiling the code it will work fine.
The problem is that the UCLASS macro loads in some code from VoxelTerrainActor.generated.h based on it’s line number, so if you move it it can’t find that anymore.
Once you compile the code, the .generated.h will be recreated with correct line numbers, so it works again.