- Home /
how to use EditorObjExporter .obj-saving-script from the wiki?
i've just tried the EditorObjExporter.cs to export a mesh visible in the player window. from http://wiki.unity3d.com/index.php?title=ObjExporter
i copied the script to Unity/Editor but i cant see anywhere an option called Custom>Export mesh?
where is "custom" supposed to appear, in edit menu?
/* Based on ObjExporter.cs, this "wrapper" lets you export to .OBJ directly from the editor menu.
This should be put in your "Editor"-folder. Use by selecting the objects you want to export, and select the appropriate menu item from "Custom->Export". Exported models are put in a folder called "ExportedObj" in the root of your Unity-project. Textures should also be copied and placed in the same folder. */
You could try looking at this answer: http://answers.unity3d.com/questions/27626/how-to-create-prefabs-from-editor-scripts.html#answer-835388
I had this issue, but once I put both the scripts described on the wiki page in the editor script it worked! You need both the wrapper class and the original exporter class in the editor folder
Answer by rhodnius · Sep 14, 2012 at 06:47 PM
Try with this package :-)
Thanks so much it works! i'm confused if notepad++ fungled the file. perhaps i should post a link on the wiki to here in case its a tech issue.
I also tried to use this script and even trying your package, but somehow the menu item doesn't show up in the File menu of Unity. I really don't know why. I'm still using Unity 5.6.3p4
Do you have any idea? :/
Answer by rhodnius · Sep 14, 2012 at 05:48 PM
HelloZoomDomain,
Well, this should appear on the Unity main menu (the one that has "File", "Edit, "Assets" , etc), if the objectexporter script is on an "Editor" Folder it should appear already, you could try also close Unity and open it again to let it refresh the customs menu.
Also the "Editor" folder where the script it's placed on, have to be with the first letter in capital.
Hope this help,
Rhod,
well, it is very weird that id doesn't work, i have unity lastest version and used it on W7 and actuallyhave it on the menu and used it a lot to export objects.
$$anonymous$$aybe try it on a clean project, just to be sure ;-)
It isnt working still, i just double checked it and restarted Unity 3 times. i'll see if unity has an enabler option for /Editor .cs scripts. brb
Ok, just in case, make sure that the name of the file of the script is exactly the name of the class of the Object exporter, in my case the class name is "EditorObjExporter", so the File name of the script is exactly that.
Oh dam i presume it is running for you then. Yes i wrote EditorObjExporter.cs so i think there is somthing odd happening. i'll put the .CS in caps although i think it's not that!
Answer by adaptive · Mar 22, 2013 at 11:20 AM
Hi, this works to get the "level" part of e.g. Snowbox ServerWorld1,
but it doesn't work for something like this Humpback Whale from the asset store:
https://www.assetstore.unity3d.com/#/content/3547
When I select the whale and do custom->export (any option) the output files are nearly empty.
Actually, first, the export feature says I have to select an object with a mesh filter. I'm pretty new, and can get confused as to what that entails exactly, but I added, in component->mesh->mesh filter, and also tried adding mesh rendered, and then the export feature does not complain, but, ya, as stated, the output files are nearly empty, and loading them in e.g. 3DS Max, it says "nothing to import".
Any tips? Thanks!
Answer by hike1 · Apr 28, 2015 at 03:54 PM
Humpback Whale Select the humpback whale in scene, and in inspector 'add component' mesh filter, then drag humpback_whale_exp1_0 MESH the thing with the square grid icon into mesh filter 'mesh' area, it will export to obj now. Still have no clue what a mesh filter is, there's on one on my washing machine water hose though. ;--]
Answer by mattpowley · Aug 19, 2021 at 03:37 PM
Make sure both of the files outlined in the wiki page are in the editor folder together. It did not work for me until they were both together. Once I moved them in the editor folder together the custom option on the menu bar showed up and I was able to export my .obj files.