Public / Private / None class creation
Once you have selected either Public or Private class when creating a new C++ class, then you do not appear to be able to NOT have a class be either Public or Private again for that project in the future (i.e., there's no way to un-select ). This leads to issues with someone new to the system as header files are then no longer found for any newly created classes. There's probably a way around that, but it sure would be nice to be able to go back to not having the value selected and having working headers for a simple project.
(comments are locked)
|
Your answer
Follow this question
Once you sign in you will be able to subscribe for any updates here
Hey blitzd-
I'm not sure exactly what you're referring to. I was able to create 2 classes based on Actor (both marked as private when creating them in the editor) and successfully compile after adding
#include "MyOtherActor.h"
inside of the first class's header file. Could you provide an example of what you're reporting or give steps for me to reproduce the issue on my end?At it's simplest it comes down to once you select public or private for a class in the creation there does not appear to be a way to NOT select it in the future. When I create a new project neither is selected when I go to create a class, but after having selected one there is no way to un-select either of them.
The more complicated bit, which I suspect there may be a way around, is that VS then does not find my class.h inside the Public folder, and I then get every little thing in the class.cpp listed as an error, and no intellisense. This does not occur if I do not select Public or Private for the class on creation, as both files end up in the same directory.
I'm facing the same issue since this bug is still there in version 4.18. I selected public ones and now I have no way to deselect it when creating new classes. It puts the header in public folder and cpp file in private. I can't even open the public folder inside the editor and private folder isn't even visible when both are there in the explorer.
I ended up deleting a whole bunch of files from the project and now it's back to normal.
This is an old thread, but wanted to put my name down for having it fixed as I've run into this issue. It's basically a trap for new users.
Unfortunately, the bug report for this issue (UE-28648) was marked as "won't fix" over a year ago. However, I have been able to work around this issue. I'm using git source control with a standard gitignore like the one found at https://github.com/github/gitignore/blob/master/UnrealEngine.gitignore . After cloning the project to a new directory, the problem disappeared. This means that the problem is in one of the local disposable files. I don't know exactly which file that would be, but you could try deleting Binaries, Intermediate/Build, etc. Basically any of the files/directories found in the list at https://github.com/github/gitignore/blob/master/UnrealEngine.gitignore .