Skip to content

Today I learned / Unity

Unity notes

Short notes from shipping Unity games: build pipelines, editor scripting, performance traps, rendering and the C# details the docs leave out.

Blender FBX: why are child objects rotated in Unity?

With Apply Transform (bake_space_transform=True) the Blender FBX exporter bakes the Z-up → Y-up conversion only into top-level objects. Anything parented under another object (a pane inside a door) arrives in Unity rotated and in the wrong place.

Fix: keep every object directly under the root, put the intended parent in the name, re-parent in Unity.

python
pane.parent = root
pane.name = "Pane_03__Door_A0"  # parent travels in the name
csharp
// editor script, after unpacking the model prefab instance
foreach (var t in all) {
    int cut = t.name.IndexOf("__");
    if (cut < 0) continue;
    var owner = all.FirstOrDefault(o => o.name == t.name.Substring(cut + 2));
    t.name = t.name.Substring(0, cut);
    if (owner != null) t.SetParent(owner, worldPositionStays: true);
}

I hit this generating vehicle models from Python in Blender. The glass was transparent, so nothing looked wrong; collider coordinates gave it away. The build now fails if a pane lands outside the vehicle.

Docs: Blender FBX export (Apply Transform is marked experimental).

Newsletter

Occasional notes on engineering, game tech, and new tools — no spam, unsubscribe anytime.

Ravy

Engineering manager, founder, and software developer building web platforms, game systems, real-time services, and automation tools. 15 years of shipped work — currently at Gaijin.net.

Get in Touch

Building an MVP, shipping a game feature, or automating a team workflow? Open source or paid — let's talk.

Contact Me
© 2020-2026 XPLOIT FZE. All trademarks, names and logos belong to their respective copyright holders.