Version: 2017.2
public void OnProcessScene (SceneManagement.Scene scene);

参数

scene 当前正在处理的场景。

描述

实现此函数以在构建期间接收每个场景的回调。

using UnityEditor;
using UnityEditor.Build;
using UnityEngine;

class MyCustomBuildProcessor : IProcessScene { public int callbackOrder { get { return 0; } } public void OnProcessScene(UnityEngine.SceneManagement.Scene scene) { Debug.Log("MyCustomBuildProcessor.OnProcessScene " + scene.name); } }