Skip to main content
GUIDE / RUNTIME IMPORT

Upload a model at runtime

Runtime loading keeps the model outside the packaged level and lets your application choose when to stream it. Use the importer subsystem from an Actor Blueprint, Level Blueprint, or C++ system. The flow below is the same Blueprint path shown in Install & first model.

Runtime workflow​

  1. Resolve the .frag path from your project, user data, or a server download.
  2. Add Make Fragment Load Options and choose an origin mode.
  3. Call Load Fragment Async and wait for On Complete.
  4. Branch on Success before using the returned Model Guid.
  5. Call Process Loaded Fragment with an owner Actor.
  6. Call Unload Fragment when the model is no longer needed.

The API entry point is UFragmentsImporterSubsystem.

Blueprint steps​

  1. Get the Fragments Importer Subsystem from the Game Instance.
  2. Add Make Fragment Load Options and choose an origin mode.
  3. Call Load Fragment Async, set Frag Path to your .frag file, and connect the options.
  4. Handle On Complete, branch on Success, and keep the returned Model Guid.
  5. On success call Process Loaded Fragment with the Model Guid and owner Actor.
  6. On failure display the returned error message while developing.

Common Blueprint nodes​

C++ path​

The same load → completion → process sequence is available in C++:

UFragmentsImporterSubsystem* Importer =
GetGameInstance()->GetSubsystem<UFragmentsImporterSubsystem>();

FFragmentLoadOptions Options;
Options.OriginMode = EFragmentOriginMode::UseBaseCoordinates;
Importer->LoadFragmentAsync(FragPath, Options, OnLoadComplete);

if (bSuccess)
{
Importer->ProcessLoadedFragment(
ModelGuid, OwnerActor, false, OnProcessComplete, nullptr);
}