Adding new C++ Files - Am I Doing it Wrong?

I always run my game through visual studio using the DebugGame Editor. The process for adding a new source file seems very disruptive to me and I wonder if I’m not doing something the intended way.

Here is a flowchart of my experience which shows that every time I add a new piece of code, I have to completely restart the editor.

I personally don’t use the add code wizard. I just browse through Windows, create a file where I need it, then open it in VS and start working on it.

Now, the important details you might not know about: The Unreal Build Tool doesn’t actually care whether a code file is in your project file or not. You can create a new cpp file without rebuilding the solution, and the next build will still include it. So if you just want to create a new file and start working with it without reloading the editor, just skip rebuilding the solution until you’re ready to restart the editor.

In addition to what cmartel said, you can also right click on the project file->generate solution file to update the .sln without doing anything in the editor itself.

Thanks I didn’t realize this. So to be clear, when you create a new file do you add it to VS at all? For instance using Add Existing File? Or do you just open the file and start coding?

I manually run GenerateProjectFiles once I’m satisfied with where I’ve put my file – very often, when creating new classes I’m still not 100% sure on, I end up renaming and/or moving the file a few times as I make up my mind. But yes, while the build tool doesn’t care about the project, a lot of the IDE functionality (and VisualAssistX) require that files be in the solution, so I do keep it up to date when I can.