`EditorApplication` is documented as an Editor-only class.
#pragma strict
import UnityEditor;
@MenuItem ("Example/example")
static function SaveTempScene() {
var path : String = EditorApplication.currentScene;
Debug.Log(path);
var sceneName = System.IO.Path.GetFileNameWithoutExtension(path);
Debug.Log(sceneName);
}
↧