Download

Proper Way to Add VS Code?

If I added code, either from the editor menu, or manually, it corrupts my code. Regardless of whether I use the refresh command or not. I then have to delete the new code, delete my Intermediate folder, and rebuild.

Edit: It seems after adding new code, I need to delete the intermediate folder, and then click “Refresh Visual Studio Code” for it to find the new folders/files. Is this the right procedure?

I added a blank character class, just as a test, and it compiles fine. However, if I go to my GameMode.cpp and change this line:

DefaultPawnClass = ANewCharacter::StaticClass();

It has a compile error saying that ANewCharacter isn’t recognized.

And I am crazy stupid.

I forgot to add the header for my new character class.
Also, the right way to add code seems to be:

  1. Add code file.
  2. Delete intermediate folder.
  3. Refresh Visual Studio Code

If someone could confirm, that would be great.

Thanks for your time. :{P

Edit: And now it is automatically doing it when I add a new file. Am I sleep deprived/crazy, or am I getting some sort of random bug?

Yeah, I can confirm. Whenever I want to add code files, I have to add them, close VS, delete the ‘Intermediate’ folder, open the VS file, click ‘Refresh VS Code’, and then I am golden.

Unreal 4.5.1
C++ Paper2D Project
VS2013 Pro

There’s no need to delete the Intermediate folder. If you add a new class via UnrealEd it will create the files in the right place and update the VS project, VS will then automatically prompt you to reload the project. If you add new source files outside UnrealEd you need to regenerate the VS project by right-clicking on the .uproject file and selecting the appropriate option from the context-menu.

Thanks for the reply! This clears up allot of confusion.