Hello to everyone,
I have a problem about Unity, it doesn’t recognize my blender projects and I don’t know why. I already tryed everything but nothing helped me, I read other forums with a similar error but they didn’t help me. The version of blender that I use is 2.91.2 and for Unity is 2019.4 (I already tried with other versions of Unity like 2018.3 and the newest version but neither of them solved the problem.
I hope someone knows the answer and can give it to me.
P.D: I can’t transform the asset to a prefab because the buttons for it don’t appear.
If should always open FBX and OBJ files. That’s sorta built in. If it does not I suspect something went wrong with your Unity installation.
To make it open .blend files, you must install Blender correctly and thus associate the .blend file type associated with launching Blender.
When it imports a Blender file, it runs this script:
./Hub/Editor/2019.4.15f1/Unity.app/Contents/Tools/Unity-BlenderToFBX.py
That’s the MacOSX pathname, the path on Windows will be different but the script is likely identical.
With blend files, make sure you have Blender installed. You probably already know that, but just in case. Unity uses Blender as part of the import process. (you said you use a specific Blender version, but for all I know you do your Blender work on a different computer and copy over the files)
What I do is make the blender project in the same computer I make the Unity project, but Unity doesn’t recognize that import process
What happens with the .fbx files is that they import to Unity but when I drag that file to the scene it doesn’t appear.
I tryed reinstalling Unity and Blender but it didn’t work (I will try to install a 2017 Unity version just in case). I installed blender correctly from my point of view but I will reinstalled just in case.
Thanks for the MacOS pathname because I’m using a Macbook to do the projects.
Here you have a picture about what happens with my .blend files and my .fbx files:
!(http:///Users/nelistoichkova/Desktop/Captura de pantalla 2021-02-23 a las 21.10.58.png)
Try just importing a 2x2x2 default blender cube.
Select it in the scene hierarchy and do Edit → FrameSelected … it might be super small or super-massive.
Does the Inspector show anything when you click on one of the files? You cropped that part out of your image.
Yes, when it is in the assets in putas the first image, and in the scene it shows me the second image.
PD they are not the same files but they are the same project.
Ok, I did that before and worked, but it seems likeif I modificate a lot the cube by pushing E to escalate and S to scale and pressing I it will not work again if I export it
Is your blender file just points and lines? There has to be faces (triangles or quads or more) or else nothing will import.
You can get the points/lines (eg, not triangles) to import by tweaking the “Optimize Mesh” setting on import.
You can also export your blend file to an OBJ file and open it in a text editor to see what is actually there.
Unity can even import OBJs, but the same rules of faces required is in effect always.
I will try to transform it into .OBJ, but meanwhile I will pass you the project that doesn’t work.
PD I did this using the default cube and I didn’t put any other forms or other cubes and triangles
That’s where you should start. Does a default cube import?
If I create a new project and save it with .blend it shows it normal in unity(it works) but I don’t know why when I modify that cube it doesn’t appear anymore in unity(it doesn’t import)
ANY modification makes it fail? Or what you actually did with the complex model fails?
There are upper limits to vert count, 64k or so, there are perhaps issues with externally-referenced files, modifiers (mostly not), parenting, linkage, etc.
But basic geometry should import just fine. The fact that it only appears to import as a blank game object makes me think there’s something wrong in the blender file. You could make a copy and start simplifying it step by step. I also like to rip out the camera, light and any other crap, and make my object(s) nice and simple.
Not any modification, there are other projects that I have that don’t work aswell, but there are others that work. Building1 is not my first project from blender with errors. I have another project less complex and it doesn’t let me import it to Unity but, on the other hand, there is another project of a hand that works fine so you can be right about the blender error. With this project (building1) I made an experiment that was about making small changes to the model and importing it into Unity. Firstly it was working well but suddenly it stoped working with any building1 file(with the less complex and with the most complex), how do you thing I can fix this if it is a blender error?
First thing I would try is to export it as OBJ since that is a text file and you can actually pull it up and stare at it… it will be gibberish, but there are guides out there on understanding it.
Look also in Blender, see about how many vertices you have… there should be about that many in the OBJ. If there is not, then fix the export step in Blender, which is a Blender thing more. To see what I mean, make a new Blender cube and export as OBJ… it’s a super-tiny file and you can understand 100% of it if you look it over.
Ok thanks, i will try that and I will inform you tomorrow (beacuse here is 00:00 here) if it worked
Another thought is you could try running that python script against blender and see if it spits out any errors… there might even be a way for Unity to tell you those errors but I think if no object is converted / imported.
Disclaimer: I have no idea how to run that script against blender, but google or blender groups might be useful for you.
YEEEEES the .obj worksssss!!! But with a little problem that makes the building invisible from the inside of that building:
This is so-called “backface culling”. By default, backface culling is turned on, which means that everything is rendered from one side only (the outside faces of the mesh).
The easiest way would be to create a new Standard Surface Shader
(or use these ones), with Cull Off
written in the SubShader
section. However, Cull Off has the side effect of giving incorrect lighting… unless you enable “Double-Sided Global Illumination” in the Material.
Other solutions: https://blender.stackexchange.com/a/10712 or the “Solidify Modifier”.
Edit: In case you’re using the HDRP, you can enable “Double-Sided” rendering directly in a Lit Material (see this page).