- Home /
Extending support for other file formats.
Is there a way of extending support for other file import? I mean, for example to create an importer for ASE files ( ASCII Extended mesh format ), which put them in our project to build the mesh and associated materials. I currently use a script to do this work.
Thanks.
Answer by jonas-echterhoff · Jan 13, 2010 at 12:52 PM
I guess what you could try is to write an AssetPostprocessor implementing OnPostprocessAllAssets. That gives you the paths to all assets being imported, so you can check those paths for the extensions you are interested in.
When you find any assets you want to process, load the data for those paths using .NET file handling functions, and create Meshes or other objects as needed. Then assign those objects back to the asset using AssetDatabase.AddObjectToAsset().
Your answer
Follow this Question
Related Questions
How do I make copies of my Font with an editor script? 2 Answers
All Asset Previews for Prefabs and Models are fully black. 3 Answers
Editor script to slice sprites 4 Answers
Editor re-creates fbm subfolder with model textures already existing in project 0 Answers
Scriptable object meta info is hidden, where did it go? 1 Answer