unity blender fbx import lack of verbosity

Imagine a C++ compiler.
After compiling 2 million lines it stops and says:
<< there’s an error in code >>

you’d think it is a joke wouldn’t you ? :roll_eyes:

well it is the way unity reacts :face_with_spiral_eyes:
8486567--1128770--upload_2022-10-3_19-36-21.png

Of course i can imagine U3D <—> python run in blender is not a simple thing ( though grabbing the command line outpout is a ‘beginner-in-c’ trial… ).

My question is pretty simple. I don’t care of the vertex causing problem. I’d just like to get the .blend filename that raises the error…

Anybody knows how to do this ?

Thanks and happy unitying ! :slight_smile:

Replying to myself with a stupid answer:

I added this to my postprocessmodel:

void OnPreprocessModel()
{
Debug.Log("asset = "+assetPath);
}

No all names of imported models are displayed…

Except…
For th 3 errors shown in the pic i posted previously…

Changing the tag to BUG…

It is a pretty simple thing. You can go look at the script yourself. It will be in a place like this:

./Hub/Editor/2020.2.1f1/Unity.app/Contents/Tools/Unity-BlenderToFBX.py

Remove ALL the blender files, put one in. Does it work? Put half of them back. Did it work? Bisect!

When you narrow down the problematic file, export it as FBX. Did that fail? If so, fix your blender file. If not, then perhaps export-to-FBX is required for that file.

1 Like

I changed the py script for my convenience :wink:

And yes this is the way i use to do: add and see…

Doing it once, twice, 3, 4 5 10 100 times…

becomes a bit boring when it would be just damn easy for devs to add << …RROR: "+buggyAssetName); >> to the U3D code^^

5 secs for them but cumulated hours ----> days for me :confused:

Oh and this don’t come from my script as when i come back to the U3D delivered script, error also happens. :stuck_out_tongue:

Finally it appears to me it’s the same kind of error you had some years ago when using NET 2.1 or something and your pizza had no chorizo…

unity says there’s an error ! get lost and have a nice day ! :rage:
I can hardly bear this :stuck_out_tongue:

As a last but not least word, i can understand that importing hundreds of thousands verts, segs, faces, UVs, blendshapes, etc etc etc… from blender or other modeler to U3D, runs without a hiccup :wink:
I consider this is kind of normal there are obstacles…
but i’m sorry, i’m unable to bear the << Something went wrong >> message with no info at all.

Happy unitying ! :slight_smile:

It is very sub-optimal, alas.

Try this, ASSUMING you use source control:

  • get this error
  • have unity open
  • type in t:model in Project window
  • look if any of them are white boxes
  • if they are, that’s the problem
  • if there are NOT any white boxes, then delete ALL models, then reimport all

Is the error present? The last two steps are necessary because depending on failure and Unity mode, it MAY show the item as a Model, or it may consider it as an unimported text.

In this latter case, now go look for any actual .blend files that did not get deleted, because those had NOT been considered “model” by Unity at import time.

I have never tried chorizo in pizza. Is it possible I am seriously missing out here?? It actually sounds interesting!

1 Like