PostProcessBuildAttribute Manual     Reference     Scripting  
Scripting > Editor Classes > PostProcessBuildAttribute
PostProcessBuildAttribute Inherits from PostProcessAttribute

Add this attribute to a method to get a notification just after building the player.

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

'target' The platform the build targetted. 'pathToBuiltProject' The file path to the build project.

// C# example:
// Automatically creates a game object with a primitive mesh renderer and appropriate collider.
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;

public class MyBuildPostprocessor {
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) {
Debug.Log( pathToBuiltProject );
}
}

// Javascript example:
#pragma strict

import UnityEditor.Callbacks;

@PostProcessBuild
static function OnPostprocessBuild( target : BuildTarget, pathToBuiltProject : String ) {
Debug.Log( pathToBuiltProject );
}
*

Constructors
PostProcessBuildAttribute