PostProcessBuildAttribute

class in UnityEditor.Callbacks

/

Inherits from:CallbackOrderAttribute

Switch to Manual

Description

构建玩家后,将此属性添加至方法以接收通知。


// C# example:
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;

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

PostProcessBuildAttribute 具有提供回调中的顺序索引的选项,从 0 开始。如果您有多个 PostProcessBuildAttribute 回调并想以特定顺序调用它们,此选项将非常有用。系统将从零开始按顺序调用回调。

Inherited members