Skip to content
← All guides

Engine recipe · unverified · 814 words · 5 min read

Import a GLB into Unity without overstating the proof

Follow the existing glTFast recipe for a local snapshot, then check loading, metre scale and materials in your own Unity project.

Our Quench barrel preview and Use it panel from existing browser export proof.
Our existing Quench barrel browser-export screenshot. Evidence of a particular GLB sample check, not a Unity or Godot engine result.

Unity tooling has not been tested here

The first rule of this walkthrough is simple: Unity tooling is untested here. Meshsmiths has existing evidence for specific GLB samples parsed with three.js GLTFLoader and checked through a browser export round trip. That is not a Unity import test, a player-build test or a guarantee about shaders. The documented Unity recipe uses glTFast as a starting point. Treat it as a task to verify in your own project, and keep the distinction visible in every handoff or production checklist.

Choose one real piece before attempting a kit. Quench barrel and Workshop lantern have concrete catalogue identities and existing sample-export evidence. Inspect the current record's access, provenance, selected version and formats. A sample that loads publicly is not automatically a licence grant, and paid access does not mean that every advertised export is released. If the selected file is unavailable, stop and record the limitation. Do not invent a token, key or successful receipt to make the import exercise appear complete.

Use the GLB snapshot from the panel

Set the supported knobs in the preview and use the GLB file tab in Use it. It exports the current object with its visible parts and baked settings, then reloads the binary with GLTFLoader before saving it in the browser. Preserve the downloaded file and note its ID, settings and measured triangle count. The ES module tab is a different path for a static three.js snapshot; it is not a Unity asset importer. Keep JavaScript module instructions out of this binary-loading exercise.

Install the glTFast version appropriate for your Unity project and consult its documentation for that version. Put the exported file into StreamingAssets as the existing panel recipe specifies. The example assumes quench-barrel.glb. Use the actual saved filename, including case, and keep the initial test local. StreamingAssets access differs across deployment platforms, so an editor path that works on your workstation is not proof of a portable player build. Test the intended target before standardising this loading approach for your team.

Call the recipe from an existing behaviour

The source panel provides an asynchronous LoadPiece method to place inside an existing MonoBehaviour. It creates a glTFast importer, builds a path under Application.streamingAssetsPath, loads the file through an absolute URI and instantiates the main scene under the behaviour's transform if loading succeeds. The failure branch logs an error rather than pretending that an object appeared. Arrange for your own behaviour to call the method and observe its completion; copying the method into a file does not invoke it automatically.

Keep the host object at a simple transform for the first check. Record the Unity version, glTFast version, saved filename and outcome. If the importer reports failure, inspect the real log and file path before changing the binary. Preserve the original snapshot so you can distinguish a loader problem from a later edit. Do not suppress errors merely to obtain a screenshot. Loading, instantiating and rendering the intended geometry are separate observations, and all three should be checked before calling the basic import successful.

// Requires the exported quench-barrel.glb and glTFast.
// Put this method in an existing MonoBehaviour.
async System.Threading.Tasks.Task LoadPiece() {
  var gltf = new GLTFast.GltfImport();
  var path = System.IO.Path.Combine(
    UnityEngine.Application.streamingAssetsPath, "quench-barrel.glb");
  if (await gltf.Load(new System.Uri(path).AbsoluteUri))
    await gltf.InstantiateMainSceneAsync(transform);
  else UnityEngine.Debug.LogError("Meshsmiths import failed");
}

Inspect the project, not just the hierarchy

Meshsmiths uses metre scale, Y-up and positive Z forward. Footprints are centred in X and Z and rest at Y zero. Compare the instantiated object with a metre reference and your real player dimensions. Inspect the transform of every parent before deciding that the model itself is the wrong size. Check facing direction in the game camera, then record any deliberate placement rotation. For Foundry yard structural modules, read the four-metre grid contract; other kits may use different rules.

Inspect materials under the render pipeline and lighting you actually ship. A material that exists in the hierarchy can still appear differently because of shader support, exposure or environment lighting. Add the colliders and interactions your game needs deliberately. Do not assume the static snapshot supplies collision meshes, navigation, LODs, rigging or animations merely because those features would be convenient. Read the current detail record, then test the supplied or project-added capability independently. Keep untested behaviour out of the basic import pass.

Qualify the target and keep secrets out

Duplicate the object to representative scene density and measure performance in the intended player build. Count every instance, not just each unique piece. Check file loading on the deployment platform, error handling when a file is missing and cleanup when a scene changes. Those checks are your project's qualification work. The public brief also mentions a Unity UPM loader package; consult its README for requirements and verification limits. Its presence is not evidence that this recovery tested Unity tooling or any particular Unity release.

Read prompt.txt before involving an agent. Supply the actual origin and request real catalogue identities, not guessed assets or entitlements. Never put an access key into a public URL, committed client code or shared prompt. Keep the delivered version's licence findings with the file, and make the final report explicit: selected IDs, knob settings, transforms, measured budgets, successful operations and open gaps. A modest import with honest boundaries is more useful than a claimed engine integration supported only by a browser screenshot.

Real records used in this guide

Check the selected version’s release, rights and access before using any file.