Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

IPostprocessBuild.OnPostprocessBuild

public void OnPostprocessBuild(BuildTarget target, string path);

Description

Implement this function to receive a callback after the build is complete.

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);
    }
}