Unreal Engine 5 C++ Multiplayer: Make Your Own Co-Op Game (Pressure Plate)

Hi devs, I have created an actor C++ class in unreal engine that has disappeared. I have all the codes in visual studio. when I try to create a new actor in unreal C++ with the same name it already exists. how do i recreate it? do i need to delete the visual studio files in my project map folders and restart coding?

When this sort of thing happens to me, I clean my build files out and rebuild from source. That’s shutting everything down, removing your Binaries, DerivedDataCache and Intermediate folders. I usually also remove Saved/ Script/ *.sln .idea/ .vs/ Plugins/*/Binaries Plugins/*/DerivedDataCache/ Plugins/*/Intermediate/ *.csproj *.code-workspace *.xcworkspace, but that may be overkill for your case.

This lets UE rebuild all that stuff cleanly. Sometimes it will choke and you need to open Visual Studio and compile your project from it. This is a good habit to be in. Normally, I start UE from Visual Studio. I also turn off Live Coding and auto-compiing of new C++ classes because I just find it to be flakey. YMMV.

If you’ve destoryed your *sln file, you can easily regenerate it by right clicking on your uproject file and telling it to Generate Visual Studio files.

You don’t have to delete. Just close the Unreal Editor and build in your code editor. This is the live coding bug.

If that doesn’t work then simply remove only the binaries and intermediate folders and launch the uproject. This will trigger a rebuild and correct the issue.

thank you so much its working now.
I had to remove everything in the plate.h and plate.cpp folders in visual for it to rebuild, couldn’t rebuild with the codes I had in.

I open another project I had and create a new actor and paste the original codes in the current project again. did not dare to create a new actor in my current project lol.

I also had a typo in the code which the debugger did not show. =)

1 Like

In the Pressure Plate Delegates lecture has a lot of debugging errors in the codes. he can steal rebuild unreal. i cant rebuild when i have debugging errors in my code? why is that?

You can’t build the code if there are errors. It is just not possible. You have to correct the errors and then you will be able to proceed.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms