foreach (UnityEditor.EditorBuildSettingsScene S in UnityEditor.EditorBuildSettings.scenes)ide
{ui
//在built setting中是否已經開啓spa
if(S.enabled)
string
{it
//獲得場景的名稱io
string name = S.path;class
//打開這個場景foreach
EditorApplication.OpenScene(name);遍歷
//遍歷場景中的GameObjectdi
foreach (GameObject obj in Object.FindObjectsOfType(typeof(GameObject)))
{
}
}
}