CoopShooterUdemy icon indicating copy to clipboard operation
CoopShooterUdemy copied to clipboard

4.25.4 Does not see Components directories

Open salimp2009 opened this issue 3 years ago • 3 comments

Hi Tom, Just wanted to learn how do you handle when you folders in c++ classes like Components; In 4.25.4 VS 2019 or Unreal does not see them ; you have identify the full path or at least in my case ; like

#include "CoopGame/Public/Components/SHealthComponent.h"

if i write directly #include "SHealthComponent.h" it does not see even SHealthComponent.cpp does not see .

Actually when you create from Unreal the SHealthComponent class in a seperate Components directory at the begining; it creates the class but it give compiling error and it is fixed when you fix the header file in the cpp file. Is there another way to that in 4.25.4 . It was not like this in prev version of UE4 . Somethng to do file include path parsers with UE4 is broken i believe; not sure if it is fixed in 4.26. Not a big deal but just wanted to learn if there is any other way to it

salimp2009 avatar Mar 12 '21 13:03 salimp2009

You should be able to use just the sub-folder like Components/SHealthComponent instead now. This is from a change to how unreal handles paths in newer versions.

tomlooman avatar Jun 30 '21 13:06 tomlooman

thnks a lot :)

salimp2009 avatar Jun 30 '21 14:06 salimp2009

Hi Toom Just wanted to learn how do you handle when you folders in c++ classes like Components; In 4.27.2 VS 2019,. I Include #include "Components/SHealthComponent" OR #include "CoopGame/Public/Components/SHealthComponent.h" -> error C4458: declaration of 'HealthComp' hides class member. note: see declaration of 'ASCharacter::HealthComp' I'm use google but can't not import correct path. You can show me fix it? Thanks.

tinhchuquang avatar Apr 28 '22 15:04 tinhchuquang