As the title says whenever i recompile the parent of my “BMW_5_F11” blueprint parent says BPSCode.Vehicle when i put my mouse over the asset in the content browser which is what it should say, but if i play the game or open the blueprint the parent class is set to ‘None’.
It doesn’t matter what i change in the code even if the Vehicle class is not modified it still happens. this doesnt happen for any of my other classes however.
I tried putting these parameters in the UCLASS Macro, but it doesn’t fix anything.
UCLASS(BlueprintType, Blueprintable)
I’ve had this problem for weeks now and i thought maybe it might be fixed in 4.6, so i waited but it hasn’t.
When you recompile are you rebuilding the project, running in debug mode through Visual Studios, or using the compile button inside the editor? Do you get the output log warnings every time you open the editor or only after changing code in the parent?
I get the problem whenever i run the editor from visual studio whether i compile or just run, but i dont get it when i do a hot reload inside the editor
I think it may be somkething to do with the generated file because it seems to only be that class would deleting and recreating the class fix this do you think?
It’s worth a try. You should be able to create a new class and simply copy/paste from the old file to the new one. If it is the file itself that is corrupt then having the new reference point should fix it.
I’m trying to reproduce your issue but don’t believe I’m getting the same result. I created a new project and used the “Add Code to Project” wizard to add a class based on actor. I immedately built the project and ran in debug mode to reopen the editor. After creating a blueprint based on the new class it shows MyProject.MyActor as the parent in the content browser and MyActor.h if I open the blueprint. I then go back into VS and add a float variable and recompile/reload in debug mode. Both the content browser and BP still show MyProject.MyActor and MyActor.h respectively. Please let me know if there is something that I am doing differently from your setup.
It’s not just that though. i think it has to be the way my c++ class is or a bug. The class is a reinvention of the AWheeledVehicle class which is what i think may be the problem do you want me to send the header and source file to you? you will have to comment out some of the stuff that require other classes
If you could supply your code it will help identify what the problem is and what the cause might be. Are you able to edit or use the blueprint when its parent is listed as “none”?
While I’m investigating the files you sent I would like to ask if you are able to edit or use the blueprint when its parent is listed as “none”? Also, when you tried this in a new project, did you use a blank class for the blueprint (new class with nothing added) or did you use the same class that you sent me?
even when i haven’t changed ANY code whatsoever just closed the editor and started it back up. it would be sort of okay if i could reparent the blueprint from the content browser but i cant
One other question, when you tried this in a new project did you use a blank class for the blueprint or did you use the Vehicle class that you sent me?
I Used the vehicle class but i recreated it. i created a class from the editor called Vehicle which derives from Pawn and just pasted the variables and functions into the files
Do you receive the same error if you open a new project and create a blueprint based on a newly created pawn class without adding any code to the pawn class? You should be able to create the class and compile then create the blueprint back in the editor. Also, just to ensure I’m working in the same environment that you are, are you using 4.5.1 or 4.6, are you running from the launcher or through source code and are you creating a coded based project or a blueprint project with code added?
Hi Doug, I am using the full 4.6 not the preview and i am running from visual studio not the project launcher and i created the project as a blank c++ project. also i have a pedestrian class that derives from character which derives from pawn. but i will try creating a new class derived from pawn in a bit and get back to you
Terribly sorry about the really late reply. i created a new class derived from APawn and made a blueprint derived from that class and it works as normal.
Glad to hear things are working again. If you experience this problem again feel free to reopen this post, however I will be marking this as resolved for tracking purposes. Best of luck on your project
Does the class still show as none if you create a new class and then copy the contents from the previous class into it? If creating a new class worked properly it is possible that the original class got corrupted and just needs to be recreated.