Hi,
I would like to create an option om my website to view in-game objects online. For this I need to export in-game objects to for example FBX/gITF files. I want to use the three.js (https://threejs.org/) library in doing so.
Can anyone explain how I can export object from unity to a file, including, the material?
thanks in advance,
Joost
Something like ExportObj.cs will do the geometry just fine: how to use EditorObjExporter .obj-saving-script from the wiki? - Questions & Answers - Unity Discussions
Materials are an internal data structure of Unity so all you can do is create blanks and try to capture as much as you can. In my experience it’s never worth the trying to code it: just remake the material on the other side.