AssetPostprocessor scripts order

I have 2 script that extend from AssetPostprocessor and uses OnPostprocessAllAssets.

My problem is that the first script has the main code and the second is a module, so I don’t want to join this scripts together.

The second one relies in a functionality that has to be done on the first script first.

How can I get that?

I have seen this, but I don’t know if it’s what I think it is. It doesn’t have many documentation.

Thanks!!

return 1 GetPostprocessOrder from the script has to be called first. Return 2/10/any-other-number-bigger-than-1 in GetPostprocessOrder of second script.

Example:

public class MaterialProcessor : AssetPostprocessor
{
    // This AssetPostProcessor will operate at a very late stage so that the attribs it sets (e.g. _Color) won't get overridden
    public override int GetPostprocessOrder()
    {
        return (100);
    }
    
    public void OnPreprocessMaterialDescription(MaterialDescription description, Material material, AnimationClip[] materialAnimation)
    {
        // Set material shader to Standard
        var shader = Shader.Find("Standard");
        if (shader == null)
            return;
        material.shader = shader;
	}
}