Documentation for Unreal Engine plugins by metyatech
Runtime Asset Import is an Unreal Engine code plugin that imports static 3D mesh data at runtime on Windows (Win64). It accepts a local file path or an in-memory byte array and constructs a hierarchy of Dynamic Mesh Components or Procedural Mesh Components.
Dynamic Mesh Components are the recommended output.
File imports resolve dependencies only inside the model directory sandbox. In-memory imports remain self-contained and never read external files.
The bundled Win64 Assimp library is included in the Fab package. CMake and a separate Assimp installation are not required for normal use.
Place the repository at:
<Project>/Plugins/RuntimeAssetImport
Then generate the project files or open the .uproject file and accept the rebuild prompt.
git clone https://github.com/metyatech/RuntimeAssetImportPlugin.git Plugins/RuntimeAssetImport
Build the project for Win64.
Success and Failure execution outputs.For in-memory input:
#include "AssetConstructor.h"
EConstructDynamicMeshComponentFromAssetFileResult Result =
EConstructDynamicMeshComponentFromAssetFileResult::Failure;
UDynamicMeshComponent* RootComponent =
UAssetConstructor::ConstructDynamicMeshComponentFromAssetFile(
FilePath,
ParentMaterial,
OwnerActor,
Result);
if (Result != EConstructDynamicMeshComponentFromAssetFileResult::Success ||
RootComponent == nullptr)
{
// Handle the failed import.
}
The parent material must contain all three parameters.
| Parameter | Type | Purpose |
|---|---|---|
TextureBlendIntensityForBaseColor |
Scalar | Selects the base-color texture contribution. |
BaseColor4 |
Vector | Supplies the imported diffuse or base color. |
BaseColorTexture |
Texture2D | Supplies the imported external or embedded diffuse/base-color texture. |
The bundled /RuntimeAssetImport/AssetImporterMeshMaterial material satisfies this contract.
A parent material missing any required parameter is rejected before a partial component hierarchy is created.
The plugin exposes these six Blueprint-callable functions:
LoadMeshFromAssetFileLoadMeshFromAssetDataConstructDynamicMeshComponentFromMeshDataConstructDynamicMeshComponentFromAssetFileConstructProceduralMeshComponentFromMeshDataConstructProceduralMeshComponentFromAssetFileThe construction functions include ShouldRegisterComponentToOwner. Leave it enabled for normal use unless the caller will register and manage the returned components manually.
File imports may resolve auxiliary files only when their final resolved target remains inside the model file’s directory or a subdirectory.
This applies to:
References that escape through parent-directory traversal, outside-root absolute paths, junctions, symbolic links, device paths, URLs, alternate data streams, or auxiliary files with multiple hard links are rejected. This prevents path references from escaping the selected model directory sandbox.
For untrusted model packages, extract or copy the model and its intended dependencies into a dedicated directory before import. The sandbox prevents model references from resolving outside that directory. Files intentionally placed inside the directory are considered available to the model.
In-memory imports support self-contained data, data URIs, and embedded textures.
They do not read external material files, buffers, or textures because the current memory API does not receive a trusted base directory.
Imports enforce these resource limits:
File-count and total-byte budgets are charged when a file is actually opened, not when its existence is queried. If a file grows and is reopened during the same import, the additional bytes count toward the total budget. Shrinking a file does not refund budget during that import.
Compressed image headers are validated before texture decoding. Width, height, pixel count, and compressed byte limits apply to external textures, embedded textures, data URIs, and texture data supplied through mesh-data construction APIs.
Use Dynamic Mesh Components instead of Procedural Mesh Components unless the project specifically requires the procedural component path.
Check all of the following:
Check all of the following:
All import and construction APIs are synchronous. Validate file size before import and call the API at a point where blocking the calling thread is acceptable.
Use the Dynamic Mesh Component functions. The plugin does not replicate imported mesh data or created component hierarchies automatically.
For reproducible problems, open an issue in the RuntimeAssetImportPlugin repository. Include the Unreal Engine version, input format, editor or packaged-build status, and a minimal reproduction.