Access blueprints from C++

I’m finding lots of tutorials for using blueprints from C++, but my blueprints aren’t showing up as types in the C++ editor.

Here’s a perfect example of what I want to do

But in my C++ project, there’s not a single type that shares a name with a blueprint I have.

In every tutorial, everyone immediately assumes I have access to blueprint types in code.

How do I actually export my blueprint types into my code project?

Okay, awesome. That’s completely fine. Everyone was just pretending like it was magic and there is a bit of generated code in UE4 so I was confused.

One other question. When I inherit Actor and use UCLASS(BlueprintType, Blueprintable), I’m still not seeing a blueprint for this class in my content browser anywhere. I could wrap it in another blueprint that inherits my c++ blueprint but that would defeat a lot of the purpose of having the c++ blueprint.

How do I actually get a c++ blueprint to show up in my content browser for use in the editor?

You can’t as your blueprint does not exist in compile time, its virtual class in BP system. Your blueprint in C++ can be defind as a closest related class type in C++, for example you use Character as base class of your class in blueprint, so in C++ it can be helt in ACharacter varable. So simpliest workaround is to make base class with all funtions and varables you need in C++ and extend it in blueprint with stuff that can be in blueprint.

You cant do that too as C++ class is not blueprint, insted you should use Class Viewer, which shows tree of all Blueprint and C++ classes. Same as in content browser you can drug class to the level and it will spawn object of that class on level, regardless if it C++ or Blueprint class

Yes, I just figured that out as you wrote it. Thanks! After quickly looking at youtube, World->SpawnActor with a stub property that’s a blueprint set in the editor is pretty much what I need… Thanks to your guidance I should be completely capable of dynamic spawning