I am trying to make a model post process using something like what they say here: Unity - Scripting API: AssetPostprocessor.OnPostprocessModel(GameObject)
But it’s not doing anything. I put the script in the Editor folder, is that enough? Do I have to call it explicitly or attach it to something, or should it just work whenever the model re-imports?
Yes, the script should run whenever the AssetPostprocessor starts (When an asset is being imported or re-imported). And the script do have to be inside a folder called Editor.
I’ve been doing this with textures and it works just fine, but I’ve done it using C#. (You might have to put “using UnityEditor;” at the top of your class)
class Postprocessing : AssetPostprocessor {
void OnPostprocessTexture (Texture2D texture) {
//Do stuff with the texture
}
}