How to get static mesh from static mesh components [BP]

Hi all,

Does anyone know whether it’s possible to get the static mesh used by a static mesh component through blueprints? Casting doesn’t work and I can’t find “Get Static Mesh”, only “Set Static Mesh”.

Thanks in advance!

I’m using blueprints :wink:

WAT?

UCLASS(ClassGroup=(Rendering, Common), hidecategories=(Object,Activation,"Components|Activation"), ShowCategories=(Mobility), editinlinenew, meta=(BlueprintSpawnableComponent))
class ENGINE_API UStaticMeshComponent : public UMeshComponent

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=StaticMesh, ReplicatedUsing=OnRep_StaticMesh)
	class UStaticMesh* StaticMesh;

/** Change the StaticMesh used by this instance. */
	UFUNCTION(BlueprintCallable, Category="Components|StaticMesh")
	virtual bool SetStaticMesh(class UStaticMesh* NewMesh);

Static mesh is accessible from StaticMeshComponent.

Show us what are you casting and how.

Static mesh is accessible from StaticMeshComponent from BP.

Show us what are you casting and how.

Well, you can’t cast StaticMeshComponent to StaticMesh, but you can get this static mesh from StaticMeshComponent:

Drag this blue dot from the StaticMeshComponent and type SetStaticMesh/GetStaticMesh in function finder.

This is from my class that’s a child of actor, Static Mesh Component is inherited

69108-screenshot+from+2015-12-02+22-24-35.png

Well that was easy, I was just being stupid x)

“We’re sorry, but this question already has some answers that you cannot delete.”
Will reread docs though!

Shame on you, you should delete this question and re-read documentation.

What kind of comment is that? I have the exact same question, do I need to feel shame? Understanding comes in many different ways. Reading the manual is important but without understanding they are just words.

I came with the exact same question. Care to elaborate on what the solution was? I am missing something important to understanding.