C++ classes disappearing

I’m having a really weird error. I’m using Unreal 4.10.3 and Mac OSX 10.11.2

Basically, any C++ classes I create are disappearing when I quit and reload the editor. It happens with the most basic of projects, so it’s definitely not down to me doing anything weird or deleting some important files or something. Here’s what I do to recreate the problem.

  1. Create a new blank project. It’s a Blueprint project since 99% of what I’m doing is Blueprint. Basic project with no starter content.

  2. Add new C++ class, a Blueprint Function Library class, since that’s what I need.

  3. The code compiles. I then get the Compile button appear, and a folder called ‘C++ Classes’ appears in the content browser, containing the new class. Perfect.

  4. I write the code in the C++ files, then compile in the editor. All good.

  5. Then I save everything and quit the editor.

  6. Then, when I re-open the same project in the editor, the Compile button has disappeared, as has the C++ folder. All blueprints using the C++ class I created are throwing errors in my face.
    The C++ files are still there in the folder structure on the hard disk.

Anyone know what’s going on, and how to fix this?

Thanks!

1 Like

On Windows I would say to right click the project file and generate Visual Studio files. I’m not sure what the equivalent on Mac would be, but it could be similar to that.

Generate Xcode project files on Mac

Got the same problem here, but on windows, I tried to generate Visual studio files, but it doesn’t work :frowning:

1 Like

@Watto30 If they aren’t generating then you may have compile errors with your macro declarations.

Today, an identical problem appeared to me.
Everything worked well yesterday. Today, it receives such an error for all classes of one of the plugins that I use.
My project has not been touched during this time. there was no update of any plugin or engine.
I do not know what’s going on completely, and I’ve tried everything. reinstallation, other versions of the plugin, file regenerate.
Any idea? Starting post is dated on 2016 so WTF?

Man, that really never happened to me, so I would really want to give you a hint, but still I have no idea how to reproduce this… :-/

I guess :smiley:
All BP nodes get hint : Call unknown function “function name”

Interestingly, the problem appeared in all projects using a certain plugin (VaRest).

And what’s even more interesting. If you manually recreate the structure. (I will call a few functions) it works in the editor perfectly.

However, after rebooting the editor, or trying to package the project for distribution. Again, everywhere is red.

After I read this post, I doubt that the bug itself would be caused by the plugin itself

Just as a thought:

  • Is there any chance of having duplicate plugin installed?
  • Maybe it is garbagge remaining at Intermediate folder, so I good idea would be delete it and recompile or run packaging again. It is known sometimes garbagge at intermediate folder result in unpredictable results.

I already checked it…

Dont works. Now i delete all engine files and im downloading new one.
Maybe that will help… but… Maybe.

BTW engine version 4.18.3

OK. i Think i found what causes that problem. And this is engine bug.

I’ll prepare and send full documentation about that soon.

Now i’m too angry for that and i need scream some vulgar words around.

I created a topic about that in Visual scripting forum, cause its more related to blueprints.
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1428350-i-found-weird-bug-in-blueprints-call-unknown-function

Hey there,
Having the same problem and I fail to open your last link ToJaGram. What was the cause in the end ?

Engine version : 4.19.2

same problem. 4.24.3 … link below is also broken…

Just had this happen to me.

Other projects fine. This project - I am launching from Visual Studio but no compile button. No way to enable Live Coding. No plugin templates.

any ideas?

[SOLVED} So I finally figured out the root cause (at least of of my issue).

Somehow I had deleted the modules stanza in the .uproject.

e.g. this was missing

“Modules”: [
{
“Name”: “PROJECTNAME”,
“Type”: “Runtime”,
“LoadingPhase”: “Default”
}
],

So I could still generate the visual studio sln and run, but no compile button, no c++ classes tab in browser, etc…

Hope this helps someone - this drove me insane for a few hours

3 Likes

This is it ^ , thank you.

I have the same problem and unfortunately all the suggestions here do not work.
The “modules” section is not missing in my .uproject.
I am using engine 5.0, btw. I tried switching to different engine versions but the cloning always fails with some errors.

Yeah same here, I recently started Unreal, using version 5.0.1, but it has been there even after all the suggested solutions were tried. Somehow the classes go missing, and so blueprints break, If you try reparenting it does not show up in the list even after we recompile the c++ class. And I get these kinds of logs :

  • Warning: failed to load outer of resource [while loading projects]

In case someone still googling it, I had the same problem in ue 5.2.
I made a AI Controller from blueprints inherit from a C++ AI Controller class, and I didn’t get any compilation errors. After a lot of internet research, I tried to set C++ OnPossess and OnBeginPlay overrites as UFunction types, which finally gave me some compilation errors: it said I was trying to declare those functions twice.
The solution: I first removed the UFunction from the code, then removed the AI Controller blueprint and made my AI Paper Character blueprint to access the C++ AI Controller class directly. I had to move all visual coding to C++, but thankfully I was only executing the behavior tree in blueprints so far.

Describing the problem it self further: it was strage, because I could create the classes from the editor and use all functions normally, it would only bug when I closed the editor and openned it again. I could copy and then remove all the coding into a new C++ class and my AI would work correctly; it would only affect me after opening the editor with the code implemented and the blueprint class inheriting from it.

My thoughts are that unreal engine visual studio debugging was insufficient, precarious. But to not having the UFunction before my function declaration in C++ was like to not let it know it was being implemented on the blueprints.