Skip to content

Unity (.unitypackage)

Unity is Awaken's fullest importer: it reads a .unitypackage archive directly, reconstructs the scene from its prefab instances, and brings across meshes, PBR materials, colliders, terrain, sky and post-FX, posed characters, and - for a uGUI Interface pack - in-game UI. This page covers what imports, the coordinate conversion, and the known limits.

What a .unitypackage is

A .unitypackage is a gzipped tarball. Inside, every asset lives under a folder named by its Unity GUID, with the real project path stored in a pathname file and the asset bytes in asset. Awaken untars the archive, maps each real path back to its GUID (so the Import Dialog can show a proper file tree and exclude unchecked assets), then decodes what you kept.

Because Unity stores geometry as FBX and scenes/prefabs/materials as YAML text, the importer parses those formats directly - there is no Unity runtime involved.

What imports

Meshes and geometry

Every FBX referenced by a kept prefab is decoded - positions, normals, UVs, vertex colours, and per-material submeshes. A multi-object FBX (several sub-meshes in one file) is baked into a single instance with its GameObject hierarchy mirrored, so the editor shows the same nesting Unity does. Imported geometry is welded losslessly on the way into the Library, recovering shared vertices that the FBX de-indexed.

Two Unity-specific mesh tricks are handled automatically:

  • Foliage splitting - Synty-style tree meshes that pack trunk and leaf geometry into one mesh (blended in-shader by a vertex-colour mask) are split into a trunk half and a leaf half so each gets its correct opaque/alpha-cut texture.
  • Mirrored instances - an instance with negative-determinant scale flips triangle winding. Awaken renders a reversed-winding copy so mirrored props aren't inside-out under back-face culling.

Materials

Materials import as albedo-only PBR: the base-colour map, base colour, metallic, roughness (from Unity's smoothness), and opacity/transparency. The importer reads the .mat YAML directly and picks the albedo slot by dropping obviously-non-albedo maps (normal, mask, metallic, occlusion, emission…) and preferring base/main names - because the albedo slot name is shader-specific. Transparency is only treated as alpha-blended in a real transparent render mode, not for alpha-cutout foliage.

A material driven by a Unity Shader Graph (.shadergraph) shipped in the pack is transpiled into a Awaken node-material, but only when that graph does something the flat PBR fields can't reproduce - a transparent or unlit surface, an emissive glow, or a time-animated/vertex-animated surface (scrolling water, waving foliage). Opaque plain-albedo graphs stay on the PBR path so they remain static-batchable. HLSL .shader files, unsupported nodes, and graphs not shipped in the pack fall back to PBR. See the Shader Editor.

Scene material re-skins are faithful: each override replaces exactly one renderer's one material slot, matched by the renderer's file ID and slot index - no atlas or name guessing. This is what makes recoloured instances (a different-tinted roof or tree per placement) come across correctly. See per-instance re-skin.

Colliders

Box, sphere, and capsule colliders import as primitives; MeshColliders import as convex hulls or concave trimeshes, resolving Unity's packaged collision meshes (.asset hulls and separate collision FBX). A prefab's collider is placed on the GameObject the user will recognise and click, and a multi-part prefab keeps each collider on its own node. See Colliders on import.

Terrain

A Unity Terrain becomes a real ground mesh: the heightmap is turned into geometry, and the splat control maps plus tiled layer diffuse textures are baked into a single ground albedo (grass/dirt/path zones reproduced in one texture). See Textures & Terrain.

Sky and post-FX

The primary (most-populated) scene's lighting and post-processing drive Awaken's Render Settings:

  • Sky from the scene's skybox material - procedural or gradient skyboxes reproduce their colours, and the built-in default reproduces Unity's default look. A Skybox/Cubemap skybox decodes its bound .dds cube into a sampled cube sky; a gradient derived from the material's tint colour is kept as the fallback for when the cube can't be decoded. Panoramic skyboxes, and cubemaps in a format other than .dds, use that gradient.
  • Ambient and fog from the scene RenderSettings (!u!104).
  • Colour grade, lift/gamma/gain, shadows-midtones-highlights, bloom, vignette from the scene's Global Volume profile - each property applied only when it is actually overridden in the Volume.

Importing a pack replaces the render effect stack so only what the source defines is present - no Awaken defaults leak in. See Post-processing.

Prefabs and cameras

Each distinct model becomes one prefab in the Library (placed at the origin), ready to drop into any scene. Every .unity scene the pack ships becomes an openable scene, with its real lights and cameras (FOV, near/far) reconstructed. If a scene has no light or camera, Awaken adds a sun and a main camera so it's viewable when opened.

Characters (skinned)

Humanoid characters are the one animated case. Synty-style character prefabs ship at bind pose (they pose at runtime), which renders a stiff T-pose. Awaken detects humanoids by bone-name overlap with a bundled idle clip and poses each one into that clip via a direction-matching retarget, building a per-character skeleton and clip and attaching an Animator so it loops. Each instance is re-skinned onto that skeleton. Non-humanoid skinned meshes (and the fail-soft case where the idle clip is missing) render at bind pose. Animated nodes stay dynamic so they are never static-batched into a frozen pose.

Particle systems

A ParticleSystem (!u!198) plus its ParticleSystemRenderer (!u!199) becomes a Awaken particle effect asset and a ParticleEmitter on the node. The importer reads the modules both engines share - MainModule (lifetime, speed, size, colour, gravity, simulation space), EmissionModule (rate, bursts) and ShapeModule (shape kind, radius, cone angle) - and maps them onto the generic effect fields.

It is an approximation, deliberately. Unity's MinMaxCurve fields are sampled at their constant/endpoint values rather than reproduced as curves, and colour and size over life keep their first and last stops. The ParticleSystemRenderer's draw material is read for its tint colour (_TintColor/_Color), sprite texture (_MainTex/_BaseMap), and blend mode - additive when _DstBlend is One, bounded alpha otherwise (a legacy fixed-function shader's blend is inferred from which built-in shader it is). A system with no readable draw material falls back to the procedural round sprite with additive blending. Open the effect in the Particles tab and tune it.

In-game UI (Interface packs)

A uGUI HUD/menu package - a Synty Interface pack, detected by an Interface… folder in the archive - imports as Awaken in-game UI rather than 3D content, because its art is loose sprite PNGs and its widgets are RectTransform trees with no meshes. What comes across:

  • Sprites under Sprites/ or Icons/ become textures, usable on a UINode image element. The import is capped at 600 sprites and ranked HUD-chrome-first (frames, portraits, reticles, compass, cursors, branding), so a pack that ships ~2000 sprites can't exhaust memory; lower-priority icon libraries past the cap are skipped.
  • uGUI widget prefabs (an Image/Text RectTransform tree) convert to Awaken UI prefabs, each a group of screen-anchored UINode entities with the anchor/pivot layout math resolved to pixel positions and Y flipped (Unity up → screen down). Drag one into a scene. Up to 250 prefabs import.
  • Assembled screens (_PreMadeHUDs/, Screens/) and a pack's demo .unity scenes are composites that instance several widget prefabs. They are reconstructed recursively - each instanced widget is loaded, re-placed under its parent rect, and the instance's per-widget sprite/colour/text overrides applied. A 4K authoring canvas is scaled so its height maps to 1080.
  • UI animation: each .anim becomes a UIClip; a widget whose Animator points at an AnimatorController gets that controller's default-state clip auto-played on import. Any imported clip can also be driven from a script with api.ui.play(name, clip).
  • Fonts (.ttf/.otf) register as @font-face, so HUD text can use the pack's typeface by name.

Known limits:

  • Navigation labels set by the pack's runtime scripts stay as their placeholder ("Label Text"). Only strings authored inline, or as a prefab-instance m_text/m_Text override, come across.
  • Dynamic layout-group screens (runtime-computed layout) can't be reconstructed statically and arrive partial or empty.
  • Some full-screen stretch backgrounds and atlas sub-sprites are imperfect and may need manual tweaks.

📸 Screenshot - save as img/import-unity-interface.png

An imported Interface pack: the Asset Browser showing the reconstructed HUD UI prefabs, with one assembled screen dropped into the scene and its sprites, labels, and layout in place.

Coordinate conversion (handedness)

Unity is left-handed; Awaken is right-handed. Getting this wrong mirrors or explodes a scene, so the conversion is applied consistently:

  • FBX render meshes are baked with a negate-X + negate-Z (a 180° rotation about Y).
  • World placements then apply the remaining left-to-right-handed Z reflection: negate the position's Z, and conjugate the rotation about Z as (-x, -y, z, w). Scale magnitudes are unchanged (sign is kept, so mirrors survive).
  • Native Unity Mesh .asset geometry (collision hulls) negates Z only, to line up with the render mesh.
  • Terrain uses the same Z reflection (keep X).

Known limits

  • Standard materials are albedo-only - normal, metallic, roughness, and occlusion maps are not applied (their scalar values are), and emission is not imported. A custom Shader Graph material is the exception: it can carry an emissive, unlit, or animated surface (see Materials).
  • Hierarchy is mostly flattened. World transforms are resolved correctly (including mount points inside nested prefabs), but the deep GameObject tree is not fully rebuilt.
  • Spot lights fall back to point; area lights are skipped. Directional and point lights import.
  • Only the themed content is decoded when a pack ships a generic sub-library alongside a themed one, to keep the import focused.
  • Sky-dome, atmosphere, and flat water planes are skipped - they rely on bespoke skybox shaders Awaken can't replicate and would otherwise carpet the view as tinted slabs.
  • Skeletal animation beyond the idle pose is not imported - characters loop the bundled idle, they don't carry their own Unity animation clips.

📸 Screenshot - save as img/import-unity-before-after.png

Side by side: the same Synty scene in Unity's editor (left) and freshly imported into Awaken (right), showing matching layout, colours, and lighting.

See also

Awaken — browser-native WebGPU game engine.