Accessing Blueprint in C++

Hey guys,

So I have a blueprint and I would like to access the blueprint within C++. The blueprint does not inherit from a custom C++ class, it only inherits from AActor, is this possible?



The best you get is creating a Blueprint Native Event. C++ can call the event, but it’s details are implemented in blueprints. The blueprint can pass values back to C++ via function parameters, but that’s the best you get. If you aren’t doing inheritance, this gets much more tricky. My advice? Avoid being tricky or clever. Keep it simple.

What do you mean by accessing the blueprint? Do you want to get a pointer to it so that you can call some methods from the AActor class?
You can access the object like any other object because like every other object it inherits from a C++ class (AActor in this example). So you can reference from another object on the level, or use UGameplayStatics::GetAllActorsWithTag to reference it if it contains a specific tag.

But tell us what you want to do so we can suggest you the best solution to your problem.

When asking programming questions assume you’re talking to a robot. Be completely specific.

People often make blurry questions then wonder why there’s no objective answers, if there’s replies at all.