Filters are deleted as soon as I reboot visual studio project when I add the code

Hello,
I have a little problem with visual studio, when I add code from Unreal Engine, Visual Studio delete my filters.
So, how can I save my filters please ?
Thank you in advance,
Cordially,
Styvak

Don’t add code from the editor. The project is used purely for organization purposes, and the editor replaces it every time you add code.

Adding real physical folders to directories where these filters exists and moving header and/or source files to those folders prevents this situation.

This is the only comment that worked for me. I had to manually add physical folders on my disk drive in order to get the filters to stay. Thanks.

Yes. You can always add c++ class from editor. In fact; adding class to project using editor is better then adding from VS.

You can always close the editor and the VS then move your classes any physical folder created by using explorer or Mac finder. The only thing you have to do is right click on the uproject then regenerate code project(VS or XCode…etc) files. This always works.