Search Unity

FBX import - mesh names

Discussion in 'Asset Importing & Exporting' started by mbbmbbmm, Aug 22, 2021.

  1. mbbmbbmm

    mbbmbbmm

    Joined:
    Dec 28, 2013
    Posts:
    59
    Hi everybody!

    The FBX importer in Unity seems a little wonky.. at least it doesn't behave like I would expect it to.
    When I export an FBX from Blender the Unity importer renames the mesh to the name of the object. If objects share a mesh the mesh seems to be renamed using a randomly(?) chosen object name.

    For instance Wall01 and Wall01.001 objects share the mesh SmallWall - the mesh in Unity that both objects use could be named Wall01.001. SmallWall as a mesh name is nowhere to be found.

    I am pretty sure Blender is exporting correctly, because:
    1) reimporting the FBX into Blender gives the correct mesh names
    2) Autodesk FBX Converter - FBX Explorer shows the correct mesh names under FBX Explorer - Geometry

    Why is it handled this way? If Blender can import an FBX correctly why can't Unity?
    This behaviour makes for ugly imported FBXs with e.g. "Block02.007" as the mesh name when it could be a neat "BlockMesh" instead.

    It also complicates the work with the AssetPostprocessor and automated Prefab creation - I would like to use mesh names as Input to determine which Prefabs need to be created or updated. When I change the objects around in Blender the mesh names generated by Unity give inconsistent results. Meaning even if in Blender the mesh name stayed the same I could end up with a bunch of unused Prefabs that I'd then need to delete manually every time.

    Maybe this can be fixed, dear Unity developers? Maybe someone has a workaround?

    Or maybe I'm overlooking something...

    Any help greatly appreciated!

    edit: tried to clarify : )
     
    Last edited: Aug 22, 2021
    Biliogadafr likes this.