I have a problem where I created a c++ class that didn’t inherit from anything. I then needed to change what the class was inheriting from due to needing certain functionality that’s in that base class. After I had done so, I recompiled the project in VS2019, closed the editor, deleted the binaries and then re-generated the visual studios project files. was going smoothly until I tried to open up the UE4 editor and was greeted with this error:
The error is pointing to the constructors (some of witch are empty) in some of the C++ files. The first thing I tried to do to fix this was straight up delete the empty constructors from the .h and .cpp files from the error. This however had no effect on the displayed error. I even went and deleted the class that I had change the inheritance type but to no avail. Launching the editor from VS also gives me the error:
I have repeatedly tried to fix this by deleting the ‘Binaries’, ‘Intermediate’, ‘Saved’ and solution files and then re-generating the visual studios project files (this is what other similar threads seemed to indicate would work) but the error still shows up when opening the .uproject file. The project build perfectly fine with no errors inside of VS2019.
Snippets of code bellow.
NeuralNetwork.h:12
class NEURALNETWORKPROJECT_API UNeuralNetwork : public UActorComponent
{
GENERATED_BODY() // Line 12
public:
PFNN.cpp:15
UPFNN::UPFNN() { // Line 15
// Makes sure the PFNN's Tick function works
PrimaryComponentTick.bCanEverTick = true;
PrimaryComponentTick.bStartWithTickEnabled = true;
// Sets up the initial values for the PFNN
Phase = 0;
Damping = 0;
XDim = 468;
HDim = 512;
YDim = 376;
PhaseIndex = 375;
PFNNThreadFinished = false;
PFNNThreadPercent = 0.f;
// Creates the weight arrays with the correct memory allocation
W0.Init(Tensor(), 50);
W1.Init(Tensor(), 50);
W2.Init(Tensor(), 50);
b0.Init(Tensor(), 50);
b1.Init(Tensor(), 50);
b2.Init(Tensor(), 50);
// Creates the threads responsible for loading in the weights
PFNNThread_Multi = new std::thread[50];
}
BioAnimator.cpp:7
UBioAnimator::UBioAnimator() { // Line 7
PrimaryComponentTick.bCanEverTick = true;
}
Is there any reason that this might be happening? Is the project corrupted? Is there any fix for this? Is changing inheritance really all it takes to cause all this or am I missing something? I’m a bit new to how the UE4 engine works so any guidance / help would be appreciated.