Intercept file import

Is it possible in Unity to override / add to the default automatic asset import behavior? I would like to add custom behavior to the way that Unity handles Modo lxo files. Ideally I would like to be able to completely take over the import procedure for certain lxo files that the user could specifies.

You might be able to use AssetPostprocessor.OnPostprocessAllAssets. If it’s not a supported asset type it is usually recognised as “TextAsset” so you can access it as binary data. If you want a custom inspector for the asset itself you could try to implement your own editor for TextAsset (so you replace the old TextAssetInspector which is an internal class).

I never tried something like that. I’m also not sure if Unity will treat such assets as TextAssets but if it does it should work.

I’m pretty sure that you can’t create your own assettype. Unity can’t handle that in their assetdatabase.

Ah that’s different then what I had in mind but it works. Thanks for all your help!