Reimport all assets in a directory via a Tool Script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By marceno

I have some assets (weapon models) that have a custom import script attached.
This script sets some shared shaders, create a new scene and a resource for each asset that I then use as items in my game.

Currently I have to select all those assets and them click “Re-import”, but I would like to make it a one button process, as I do that for other things too, but I could not find a way to trigger the Re-import through a script.

Any tips?