Dynamically Loading Large Groups of Static Mesh in Blueprint

I’ve got an FBX from blender that contains approximately 2000 individual meshes. I need to import that into Unreal as individual meshes (which i’ve done already by using import and unchecking combine), but I need each static mesh to be part of it’s own blueprint which will actually be a child of a master blueprint.

The reason for this is because I need to dynamically load these assets as well as be able to store variables that coincide with the mesh, having functions like highlighting etc. In the end i’ll have a single master blueprint, that when created spawns all those 2000 pieces, but I need to be able to reference the meshes so that I can loop through them.

I’m thinking if I could somehow in my parent blueprint tell it to grab every static mesh from a specific folder in the content browser, then create an instance of my child blueprint for each, then set the static mesh to that instance. The static meshes are all named the same with incrementing numbers so maybe a loop and get the mesh by name by using a static string and then just adding the number to the end in a loop instead of the folder idea?

Right now the only option I can find is to do this manually. The thought of having to sit there and create 2000 blueprints and drag and position a mesh in each one is depressing.

Hey there,

Your first idea was spot on, although you might have to dive into C++ to do it. Take a look at this:Asynchronous Asset Loading | Unreal Engine Documentation

More importantly, take a look at the first code sample regarding the Object Library. It generates the library from a folder path and you can then dynamically (and asynchronously) load all the objects. Then your master BP could just create your child blueprint class and assign the proper mesh as you wrote.

The reason I’m not sure it works in Blueprint is because I don’t think this sort of dynamic Object Library creation (or even any Object Library functionality) is exposed to Blueprint, although you CAN create OL assets in the Content Browser and manually assign objects to them. Hope that helps!

Best regards,

Damir H.

Is there a way to create a function that a blueprint can use to run the c++ and get a returned object such as the mesh to then continue using in blueprint?

Also have you seen this plugin? (39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required! - Blueprint - Epic Developer Community Forums Would that possibly work? Sorry not new to programming, but pretty new to Unreal and never used c++.

That node from Rama’s plugin would work but you’d still have to generate the paths manually and it’d all happen synchronously. But there is nothing stopping you from exposing the functionality to Blueprint.

For now, since you’re new, use Rama’s plugin node. Once you get more comfortable with the engine switch over to the C++ solution.