LNK2019 means the declaration of your class is missing somehow, check if you included it in you Actor’s .cpp file:
#include "MyPath/DopplerComponentTest.h"
Or something like that. Also, check if the module is missing in your Build.cs file. If the declaration exists and is correct. And reload your project’s code base.
Additionally, to initialize a new UObject you must use Unreal’s framework method.
Awesome thanks! I’ve fixed the link error but now I’m having trouble choosing where to initilialize the UObject as I don’t want to be Initializing a new object every tick, but I do want to call a function from said object every tick.
However when I try and initialize the object in the header file or the beginplay function of the .cpp file, it won’t allow me to reference the object within the tick function as it’s been initialized in another function.
I’m now getting these errors,
C:\Users\User\Documents\Unreal Projects\WwiseCPlusPlus\Source\WwiseCPlusPlus\DopplerActor.cpp(74): error C2228: left of ‘.DopplerUpdatee’ must have class/struct/union
C:\Users\User\Documents\Unreal Projects\WwiseCPlusPlus\Source\WwiseCPlusPlus\DopplerActor.cpp(74): note: type is ‘UDopplerComponentTest *’
C:\Users\User\Documents\Unreal Projects\WwiseCPlusPlus\Source\WwiseCPlusPlus\DopplerActor.cpp(74): note: did you intend to use ‘->’ instead?
I tried using obj->DopplerUpdatee(); instead of obj.DopplerUpdatee(); but it caused another link error .