report | BuildReport 包含有关内部版本的信息,如目标平台和输出路径。 |
实现此函数以在内部版本完成后接收回调。
此回调在构建 Player 过程中调用,但不会在构建 AssetBundle 过程中调用。如果生成因失败或取消而过早停止,则不会调用回调。
其他资源:BuildPipeline.BuildPlayer,IPreprocessBuildWithReport
using UnityEditor; using UnityEditor.Build; using UnityEditor.Build.Reporting; using UnityEngine;
class MyCustomBuildProcessor : IPostprocessBuildWithReport { public int callbackOrder { get { return 0; } } public void OnPostprocessBuild(BuildReport report) { Debug.Log("MyCustomBuildProcessor.OnPostprocessBuild for target " + report.summary.platform + " at path " + report.summary.outputPath); } }