x


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.

more ▼

asked Dec 11 '09 at 01:54 PM

Gunder gravatar image

Gunder
288 11 13 27

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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().

more ▼

answered Jan 13 '10 at 12:52 PM

jonas echterhoff gravatar image

jonas echterhoff ♦♦
9.8k 7 23 104

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1677
x973
x419
x349

asked: Dec 11 '09 at 01:54 PM

Seen: 1379 times

Last Updated: Jan 13 '10 at 12:52 PM