I have just started using Unity 3.0 beta and really liked the tree editor. However, i think it would be great if I could export the mesh I create in Unity to FBX or obj so I can open and exchange tree models back to 3dsmax. Is this possible or planned in future. Thanks Brodie
Hi! As far as I know, you should already be able to export those tree-models to an external 3d-app by using the .obj exporter found here: http://www.unifycommunity.com/wiki/index.php?title=ObjExporter http://www.unifycommunity.com/wiki/index.php?title=ObjExporterColorUvs Haven`t tested it myself yet, but I don`t see why it shouldn`t work. Cheers, Roald
I tried the script but it came up with this error Assets/EditorObjExporter.cs(80,57): warning CS0618: `UnityEditor.EditorUtility.GetAssetPath(UnityEngine.Object)' is obsolete: `Use AssetDatabase.GetAssetPath' Im a bit of a noob so I may have put it in the wrong place. I tried putting the script here C:\Program Files (x86)\Unity\Editor Also, should CUSTOM then come up on the main toolbar? THanks
I have replaced UnityEditor.EditorUtility.GetAssetPath with Use AssetDatabase.GetAssetPath to no avail. Any suggestions. Cheers Brodie
Hey Mokiloke, I don't know if you already found a solution for your problem if not here you go: "Assets/EditorObjExporter.cs(80,57): warning CS0618: `UnityEditor.EditorUtility.GetAssetPath(UnityEngin e.Object)' is obsolete: `Use AssetDatabase.GetAssetPath'" To fix it you just need to find line 80 on the script and change the EditorUtility to AssetDatabase; as you can see below; this should fix your problem and you will be able to export your tree meshes!! I did that and got them on my 3D application for tweaking!! I'm not 100% sure if this is the right way to fix this or it only bypass that line of code; I'm an artist not a programmer but this trick works as I'm already using it!! Guarantee!! Once the script is working you should find the "export obj options" on the main bar on the "Custom" menu! if (mats[material].mainTexture) objMaterial.textureName = AssetDatabase.GetAssetPath(mats[material].mainTexture);
Hi, I have a similar problem. I tried to export the BigTree example but i get the error "IndexOutOfRangeException: Array index is out of range". In the Export folder is an obj file with a size of 1kb. But it don't work with 3dsmax, cinema4d, microstation or sketchup. What have I as c# noob to do? I tried dakkons suggestion. If I change the line 80 the custom toolbar disappears. Thanks Pockie
hi, i've got the same error as Pockie "IndexOutOfRangeException: Array index is out of range", trying to export the Big Tree example. In the Wiki, there are two files : ObjExporter.cs and EditorObjExporter.cs. I put the second one in the Editor Folder and i have the sub-menu "custom/Export" but what about the first file ? Thanks Fab
the complete error is, so check whats happening in line 68.. line 68: Code (csharp): sb.Append("usemtl ").Append(mats[material].name).Append("\n"); add this line before it: Code (csharp): Debug.Log ("material:"+mats[material].name); ..what happens?