ドキュメント

Unity Engine

Unity Engine

GetBuildIndexByScenePath(string)

Get the build index from a Scene path.
読み終わるまでの所要時間 1 分最終更新 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.