Can't add C++ components to Blueprints directly anymore in 4.18

  1. Create a new C++ component
  2. Set its UCLASS to: UCLASS(Blueprintable, ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
  3. Compile
  4. The component isn’t recognized by the Add Component button in Blueprints anymore

This used to work fine in 4.17, has anything been changed in the implementation in 4.18?

Try specify a *Category *and make sure class is exported (blah_API stuff).

Whenever I have a problem like this (and I’m using loads of custom components so it’s happened a few times) I go through these steps and it usually seems to work:

  1. Close both Unreal project and Visual Studio.
  2. Delete derived folders (Binaries, Intermediate, Saved)
  3. Right click project file and ‘Generate Visual Studio Project files’
  4. Open up Visual Studio project and ‘Rebuild Solution’
  5. Open up Unreal project - it will ask to rebuild DLL on opening

It’s a bit of a ‘have you tried turning it off and back on’ kinda answer, I know, but if the code looks like it should be working and just isn’t, this often makes it work for me.

Apologies, I wasn’t getting any notifications about replies to this post. Unfortunately, setting a category did not resolve the issue, and neither did cleaning up the project, deleting any temporary folders and recompiling it.

Are you exporting your component class with the API macro?
I’m using 4.18 and my Components show up just fine in the list.

I’ve just updated to 4.18.1 which has actually resolved the problem completely… I don’t know what was causing it in 4.18.0 but now everything seems to be working fine in 4.18.1. Note: I have also gotten rid of the “Category” specifier, and it even works without that. I guess there was a bug in 4.18.0 that might have been fixed indirectly by something seemingly unrelated, as I haven’t seen a fix targeted specifically for this. Thanks again for your time!