Search Unity

How to use AssetDatabaseExperimental.SetImporterOverride automatically before import?

Discussion in 'Asset Database' started by Xarbrough, Nov 3, 2020.

  1. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I'm trying to replace and extend the PSDImporter with my custom version by following the documentation. However, the example only shows how I can use
    AssetDatabaseExperimental.SetImporterOverride<PSDImporterOverride>(path)
    to set the importer manually via a menu item. Instead, I would like to apply this importer to all PSD/PSB files in the project, so I thought I could simply call the same thing in OnPreprocessAsset, but this doesn't work.

    Is this a bug or how would I go about this?
     
    forestrf likes this.
  2. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I still have the same question, even though the API is out of experimental, if anyone knows. ^^