Version: 5.6

IPostprocessBuild.OnPostprocessBuild

切换到手册
public void OnPostprocessBuild (BuildTarget target, string path);

描述

构建完成后,实现此函数以接收回调。

using UnityEditor;
using UnityEditor.Build;
class MyCustomBuildProcessor : IPostprocessBuild
{
    public int CallbackOrder { get { return 0; } }
    public void OnPostprocessBuild(BuildTarget target, string path)
    {
        Debug.Log("MyCustomBuildProcessor.OnPostprocessBuild for target " + target + " at path " + path);
    }
}