Accessing a Static Mesh inside of a Blueprint?

I have a script that is casting an Actor to a StaticMeshActor and if I embed the mesh inside of a Blueprint, then the cast fails. How can I access the mesh inside the InteractiveDoor Blueprint

I’m sorry if this is so basic…I searched all over before posting, I swear!

The PlayerCharacter Blueprint trying to cast the mesh:

InteractiveDoor Blueprint with a DoorMesh static mesh component (cast does not work):

32120-ugh2.png

Regular static mesh dropped into the map (cast works):

32151-ugh3.png

I think a Blueprint Interfaces or Blueprint Communications would be your answer here.

How To Use Blueprint Communications

Direct Blueprint Communications

Blueprint Interface

Implementing Blueprint Interfaces

Thanks for the answer, but I am not sure about either of those as a solution for this issue. I don’t need to communicate to the object’s Blueprint, I need the mesh component inside of it.

Yes, I could probably completely rewrite everything to send a message to a custom interface to then set the render depth on the mesh but…I’ve written everything else thus far in a way to specifically to avoid that…

Yes … but if you plash your mesh in a Blueprint then you can access it. At least that is how I would do it.

The other way is to click on the object in the map and then open your Blueprint … right-click and say get reference to … this should work under most circumstances.

I however prefer to put my meshes in Blueprints and use them that way.

What exactly do you mean by “plash your mesh in a Blueprint” ?

Also, there’s no way I’m doing the second method.
I’m trying to create a generic system and that defeats the purpose! :slight_smile:

Sorry was meant to be place.

Right click your static mesh … select create blueprint from this … now your mesh is in a Blueprint and you have access to the construction script and event graph for that mesh.

The other option to do this is to create a new actor blueprint and then add the mesh in the components section.

This is your most generic way of doing it. You will also now place your blueprint in the level instead of the mesh itself.

“Right click your static mesh … select create blueprint from this … now your mesh is in a Blueprint and you have access to the construction script and event graph for that mesh.”

This is exactly what I have, actually. And it is that blueprint that is placed in the level, not the mesh.
Look at the 2nd picture. That is the blueprint version of the mesh.
The 3rd picture is just for comparison…it is the mesh placed directly in the level.

Actually, you are correct and I was wrong.
The one I have in pic 2 has a base class of Actor not static mesh.
I thought I had created it like you suggested (right click → create blueprint from this, etc) but I guess not. Just for kicks I decided to make a new one from scratch with that method and it has the same base class (static mesh) and works. Thanks for the help!