I can't drag a component to the details

I need to initialize a variable of a component.
Specifically I want to drag a mesh.

But the details disappear when I select the mesh.

I know that I can get a reference to the mesh from inside the component.

The problem is that my pawn has multiple meshes attached. And I want the component to work with all kinds of meshes. (skeletal and static).

That’s why I need to assign the mesh from the details panel.

How can I do it?
Any keyboard shortcut or something?

Thank you very much!!


For administrators:


You’re trying to set a mesh variable with a skeletal mesh. That’s not going to work.

Also, I don’t know if this would work in any event, as you’re trying to drag an instance onto a class setting. ( I’ve never tried it ).

2 Likes

Hi

Static mesh and skeletal mesh has a common parent class?

I assumed that the mesh component was the common parent… I really don’t know.

I would like to use polymorphism to do this.

At the moment I am using an interface.

3

Seems to work with static mesh… I’m going to test skeletal mesh now…

However if I could use polymorphism and drag the component to the details I would prefer that to using an interface.

Thank you for your comment ClockworkOcean!! :sparkling_heart:

1 Like

Are you referring to blueprint inheritance or actual polymorphism ( which I know nothing about )?

I think meshes and skeletal mesh are just different classes :slight_smile: ( I mean, they are both objects, but so is almost everything ).

Their job is totally different. It’s a bit like trying to combine a material and a blueprint, or something :slight_smile: It might be better to have two slots. Just an idea…

2 Likes

What I have been able to test for inheritance and polymorphism in bluprints works the same as in C++.

OK, so if they don’t have the same parent I’ll have to do some adaptation… I want this component to work with any type of mesh.

Thank you so much for your help ClockworkOcean!!

1 Like

I found a common parent. For what I want (assign a material) I think it will be enough.

4

1 Like

Ah yes… :pray:

2 Likes