I tried to inherit from CPathVolume to add some custom methods. But whenever I call existing methods of the parent inside my new methods, it causes LNK2019 error when packaging.
Reproduction Steps
Declare CpathFinding module in my Game.Build.cs, in PublicDependencyModuleNames.
Make a child class in the game module.
VerminExtermiantorCPathVolume.h
UCLASS()
class VERMINEXTERMINATOR_API AVerminExtermiantorCPathVolume : public ACPathVolume
{
I didn't actually think someone would be using these methods. They need to be inline for performance reasons, but if declaring the body in .h file fixes the issue, I will look into it
Describe the bug
I tried to inherit from
CPathVolume
to add some custom methods. But whenever I call existing methods of the parent inside my new methods, it causes LNK2019 error when packaging.Reproduction Steps
Declare
CpathFinding
module in myGame.Build.cs
, inPublicDependencyModuleNames
. Make a child class in the game module.VerminExtermiantorCPathVolume.h
Make some calls to parent methods:
VerminExtermiantorCPathVolume.cpp
Try to package the game and get the following error:
Workaround
declare methods in child header file:
VerminExtermiantorCPathVolume.h
Possible Solution
CPathVolume.h
file instead ofCPathVolume.cpp
or
CPathVolume.h
andCPathVolume.cpp
Targeted version
UE5.1