report | 包含有关构建信息(例如目标平台和输出路径)的报告。 |
实现此函数以在开始构建之前接收回调。
此回调在 Player 构建期间调用,但在 AssetBundle 构建期间不调用。
其他资源: IPostprocessBuildWithReport, BuildPlayerProcessor, BuildPipeline.BuildPlayer
using UnityEditor; using UnityEditor.Build; using UnityEditor.Build.Reporting; using UnityEngine;
class MyCustomBuildProcessor : IPreprocessBuildWithReport { public int callbackOrder { get { return 0; } } public void OnPreprocessBuild(BuildReport report) { Debug.Log("MyCustomBuildProcessor.OnPreprocessBuild for target " + report.summary.platform + " at path " + report.summary.outputPath); } }