Is it possible to reference a blueprint from within another blueprint like you would a static mesh only with associated events/functions available? I’m not seeing how to do so in the documents but it seems like it should be something that exists.
Edit:
I’ll add details about the task problem I’m trying to solve as requesting since it seems I’ve got a bad idea of how the blueprints are supposed to work and don’t have a clue how to proceed.
In this image you can see the various static meshes involved as well as their movement paths (red = rotational, green = linear, blue = large-scale arc):
And this image will show the separate operations for a single animation (order of operation = brown, red, white+purple, green, pink, blue, yellow [up to this point the black door outlight was moving along with the green then blue paths of motion], orange, reverse-pink, reverse-green, reverse-purple+reverse-white, reverse-red, reverse-brown) - extremely sequential in nature with moving “local” rotational frames throughout:
The TL;DR: of which is: lots of movement and rotation of meshes parented to eachother’s local axis at different times in the animation that would be grueling to animate from within a single local reference frame. A bit of an addendum to this, it would be nice to be able to keep the door (black outline, barely visible but pictured below alone for detail) as a separate blueprint so it can be used with hinges instead of this under-floor-blast-door-grabbing-apparatus I’m currently trying to animate as it has it’s own fairly complex set of animations to control the iris shutters on the windows and all the linear movements for the deadbolts combined require a bit of scrolling).
I direct reference is only possible in the LevelBlueprint. There you can create a reference by selecting the spawned Blueprint inside the scene and then rightclicking on an empty spot in the LevelBP: There you can choose something like “Add Reference to: Name of the Selection”.
Normaly, if you want to use another BP in your main BP (let it be the Character or something), you have certain events happening. For example the character and the other BP have an overlapping Collision. Then you could use the Event “OnOverlapBegin” and just the “OtherActor” output to cast an use the Actor(BP) like you need.
You could also linetrace an object.
Most of the time there shouldn’t be a point where you need to have direct access without interacting with an actor like i said above.
The BP that you need constant access to (like gamestate, gameinstance, hud) have pointers in the controller and in all BP.
If you still don’t know how to solve your problem, feel free to update your question with the exact problem and leave a comment.
You can also have a look at Blueprint Interfaces:
These are meant to share information between BP. Maybe this is exactly what you are searching for. (:
First of all learn learn what blueprint really is, because you seem to getting in to newbie myth that blueprint = object
Now with that knowledge that you want object reference (instaniated object) or class refrence (refrence to specific blueprint to spawn), because thats 2 different things
To parent one Blueprints as piece of another Blueprint, you use the Child Actor Component:
(Click the Add Component Button and search for “Child Actor”).
To access the Blueprint that is in the Child Actor Component, you Get the Child Actor Component then you get the Child Actor node and cast to type you want if you need to cast;
(That node is the reference to the Actor in the world, your sub-Blueprint, the reference to the Child Actor Component won’t give you access to the child Blueprint you must get the Child Actor node from it, remember that):
Sorry, must have hit it twice or it didn’t take when I hit it the first time. (the site was saying an error occurred when trying to upvote+check it and I refreshed, the thing turned green so I thought it had taken).