private void AddCurrentScene()
{
string currentScene = EditorApplication.currentScene;
if (currentScene.Length == 0)
{
EditorApplication.SaveCurrentSceneIfUserWantsToForce();
currentScene = EditorApplication.currentScene;
}
if (currentScene.Length != 0)
{
ArrayList list = new ArrayList(EditorBuildSettings.scenes);
EditorBuildSettingsScene scene = new EditorBuildSettingsScene {
path = currentScene,
enabled = true
};
list.Add(scene);
EditorBuildSettings.scenes = list.ToArray(typeof(EditorBuildSettingsScene)) as EditorBuildSettingsScene[];
}
base.Repaint();
GUIUtility.ExitGUI();
}