Hello all, here is a snip where I create an instance of a UObject-derived class that I wrote and call its Init method, then store a reference to it in a variable. This is done in my level blueprint.
I would like to pass this reference to another blueprint so that it can access its data. My question is, how do I share this reference with another blueprint? From what I’ve seen, directly communicating between blueprints requires being able to make a variable of the same type as the target, which I haven’t found out how to do for a level blueprint. Will I have to move this functionality outside of the level blueprint?
How does the Level Blueprint find your other blueprint instance or instances?
How does the Level Blueprint actually communicate the value to that instance?
To solve #1, you typically use “find all actors of class,” or use tags on objects.
Once you have one or more instances from #1, you either make sure that your type has a known method or variable of the appropriate type, or you implement a specific interface that’s used to communicate with the object, get that interface from the object, and call the interface.
I should also mention that I’m trying to communicate data from the level blueprint to my UMG UI, so no actors.
I’m now having issues with implementing a C++ interface function in blueprints.
I created a C++ interface that I added to my level blueprint. This interface has a function that is defined as follows:
This function shows up in my left-hand list of functions as callable, but it does not allow me to override it in order to actually implement it.
My hope is that I would be able to override it and pass in my level blueprint’s instance of UPopulator. Then, I would be able to add the same interface to my UI blueprint and call the data that I need from the level blueprint. Am I approaching this wrong, or am I just overlooking something?
This sounds like a question about the specifics of the C++ / Blueprint calling interface (which goes through the Unreal header generation tool.)
When I look in the source code, I see lots of things that use BlueprintImplementableEvent, but those are NOT marked BlueprintCallable, so perhaps you should remove BlueprintCallable from your markup?