기술 자료

Unity Engine


User Manual

Script Reference

Unity Engine


GetBuildIndexByScenePath(string)

Get the build index from a Scene path.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public static int GetBuildIndexByScenePath(string scenePath)

Parameters

scenePath

Scene path (e.g: "Assets/Scenes/Scene1.unity").

Returns

Type

Description

intBuild index.

Remarks

The build index refers to the index into the list of Scenes as specified in the Build Settings window.
If the scene isn't found it returns -1.