Version: 2021.3

SceneManagerAPI.GetSceneByBuildIndex

切换到手册
protected SceneManagement.Scene GetSceneByBuildIndex (int buildIndex);

参数

buildIndex Build index as returned by SceneManagement.SceneManagerApi.GetNumScenesInBuildSettings.

返回

Scene 如果有效,则返回对场景的引用;否则返回无效场景。

描述

Override for customizing the behavior of the SceneManager.GetSceneByBuildIndex function.