[Feedback] Beta 6 - Add Code to Project

I’ve added some new C++ classes to the game today and noticed a new bug in beta 6. Previous betas, when using “Add Code to Project” would place the header in the “Classes” directory and the .cpp in the “Private” directory.

With beta 6 I’m finding that both the header and .cpp file are both being placed one level down from there - so they end up being in the same folder together.

Hi Neil,

This was an intentional change and not a bug. Here is the information from our release notes:

Private module source files no longer
need to be placed under a “Private”

  • Now, all source is assumed Private unless it’s under a “Public” folder
  • This means you can have all of your game source in a single folder if you


That means that this change makes it harder to add code and have usable directory trees (since the directory tree directly affects how files appear in the VS project). Why? Because Rocket also adds the code to source control.

So now the steps, for anybody ■■■■ enough (like me) to care about directory structure, are to:

  1. Add code to project
  2. Go into P4V and remove the new files from source control
  3. Move the files to where I want them to be
  4. Go back into P4V and re-add them.

I’d suggest either:

a) Don’t automatically add source code files to Perforce (which, arguably, doesn’t really make sense anyway for a dynamically generated VS project based around the directory structure) or
b) Ask the user where to put the files

Just a suggestion - I just hate cluttered files. :slight_smile:

It seems like you should just be able to use the right-click Rename/Move option in Perforce to move the files to your desired location.

As for automatically adding files to Source Control, are you seeing these in the Workspace or in the Depot?


It’s will appear in my default pending changelist - and yes, I could do that. It kind of “pollutes” my changelist though because it then will mark files that weren’t even added to the repository yet as being removed and re-added in the new location.

I wouldn’t quite care so much - but this is very much a Perforce-specific action that’s taking place - one which is taken care of by using “p4 reconcile” in any case. :slight_smile:

I’m sure it won’t get fixed because I’m sure it’s not a high priority - but it is frustrating to me personally. I care about how files appear in my Visual Studio project - which means I have to care about where the files are on-disk because the project is generated to reflect the folder structure.

I understand. Thank you for the feedback Neil, I will pass it along.