Home Unity

Mass Import Models

ngon master
Offline / Send Message
zachagreg ngon master
So is there a way currently to mass change import settings on models in Unity. I have seen various threads on the subject and the people that answer link some script but there's no discernible way to actually run the script without running the game. I don't believe Unity can re-import objects or change the settings for those objects while in game. They never really say how to execute or evaluate the script in the editor.

Also the script that I've found off of Unity's documentation uses the methodology of defining a preset in the Inspector Import Settings and then applying that to everything in the folder with the preset. This would be fine except for three issues:

1. The presets don't seem to respect tabs on the Import Settings at all so the same thing has to be applied to all tabs resulting in four different iterations of the script.
2. Presets don't respect materials assigned to the object. You can have it change the settings for how the materials should be remapped but then you have to go through every object and actually remap those objects. 
3. I see no way in the documentation about how to actually run said script. Again this may just be missing some fundamental chops as scripting is still relatively new to me.

I do now know about the Preset Manager and have since set a default but I was wondering if there was a way to actually run through the older ones quickly without selecting every single object.

Replies

  • slrove
    Offline / Send Message
    slrove polycounter lvl 5
    Well actually you can have a script that sets all the import settings automatically based on your preferences. It isn't a script that you run, but is one that is under and Editor folder that then runs automatically. In the project we used a custom asset importer for hundreds of animation files that were output from mocap processing. Would have been a pain to hand set each files import settings so we wrote a script to automate it. Can't share my specific example but this one here does a good job breaking it down: https://sarpersoher.com/unity3d/conditional-asset-importer/

    When scripts are located under a folder in the project called Editor it will automatically run with Unity. It is usually where custom UI or other in-editor behaviors are located. In this case the script would automatically set import settings. And the key in the script above is it uses the unity asset importer : documentation

    Or alternatively you should be able to make a preset: documentation

    If you right click an asset in the project, you should be able to re-import. You should also be able to multi select and re-import.

Sign In or Register to comment.