Is CustomMeshComponent Variable Documentaion Existent?

Hello. So I have this simple BP script going on:


When I run it, I get the error in the log as shown. It is suppose to create a triangle with the vertices specified in triangle vertices array. Is there documentation on the CustomMeshComponent viariable?

What am I doing wrong here, and is there anything I can do to get rid of the error, and make the triangle spawn?

(Or even documentation about this specific variable type)

Anyone know of a fix to my problem?

You trying to call function on nothingness as CustomMesh1 varable is not set (its None). You can fix that by setting varable beforehand or checking if varable is set.

Thank you! Finally someone has replied to me! :smiley:

Do you mind helping me a bit more, it still seems to not work, what nodes would I need to add for the triangle at (0,0,0)(100,0,100)and(0,100,100) to spawn?

You need custom mesh to spawn in to world right? So spawn it and set to variable, or else you already got it in level then you can set it as varable defau.t

I don’t seem to be able to do this correctly. :frowning:
Is it possible for you to show me what you mean?

Thank you for your help so far. It really means A LOT.
I’d very much like to complete this, and once I get this right, I’ll be done :smiley:

How do I set it to a variable? I know how to do that with every other data type, but not custommeshcomponents.

I originally got the script off someone else…

I was just able to do this.
I had to do it not in the construction script, but in the event graph after “Event Beginplay”
You have to use “Add Custom Mesh Component”, pass an Actor to that and store the result into a variable, which you can then reuse whenever you want.

I recommend also spawning a new Actor beforehand, because the placement of that custom mesh depends on the position of the actor you passed it. (I made trails for bullets and added the Mesh to the bullet, so the mesh basically moved with the bullet instead of staying at the same place in the world.) If you want the mesh to move with your actor, keep the target at “this”.