Can we get all meshes inside a specific folder into a array with blueprint?

Hi, for example, I have just import meshes from megascan


they are at
“D:\Documents\Unreal Projects\Blank\Content\EuropeanHornbeam\Geometry\PivotPainter”

Is there any nodes in blueprint can let me import all those meshes into an array everytime the game is played? I could do it manually but it would be very good that the game can auto detect and import the mesh into array so I can just freely dump meshes into the folder.
I checked online but some said it can only done by c++, but somes say you can use “get asset by path” to do it but I can’t make it work.

2 Likes

This is part of a blueprint that will find all the meshes ( recursively ) from the folder it was in before you dragged it into the map:

You can use a specific folder by hard coding it in this node

image

2 Likes

WOW, that’s a long code.

I am using this simplify code to get all the meshes in the folder (BTW, How do I make blueprint editor fullscreen? I know for viewport it is F11, but what about blueprint? It such a pain for me to screenshot these nodes in small screen)

Right now I got all the meshes into the array, but I noticed every different game the order of the elements inside the array would be completely random and different, some times it would be tree01, tree02, tree 04… sometimes it would be glass02,tree01, tree03… etc.

I think It just randomly importing those meshes into the array, can this problem be solved? Or is that your code already solved this problem?

BTW, can we get all those meshes’ thumbnail too? Or I really have to make the thumbnails manually?

Use this

The meshes will arrive in random order. I guess you could spend time reordering them based on name.

Thumbnails, not sure about…

1 Like

Okay then! So there is a way to reorder the array with blueprint? I will check about that.

I guess I have to make the thumbnail myself then…

1 Like

Yes, you have the asset names, and references. You would need to make an array of names, and one of the assets, and sort the name array, meanwhile sorting the references.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.