public void OnPreprocessBuild (BuildTarget target, string path);

描述

在构建开始之前实现此函数以接收回调。

using UnityEditor;
using UnityEditor.Build;
using UnityEngine;

class MyCustomBuildProcessor : IPreprocessBuild { public int callbackOrder { get { return 0; } } public void OnPreprocessBuild(BuildTarget target, string path) { Debug.Log("MyCustomBuildProcessor.OnPreprocessBuild for target " + target + " at path " + path); } }