Paste_Image.png
void Start () {
Debug.Log(Application.loadedLevel);//获取当前场景的value
print(Application.loadedLevelName);//获取当前的场景的名字
print(Application.dataPath);//获取包含游戏数据文件夹的路径(只读)
void OnGUI()
{
if (GUILayout.Button("保存"))
{
Application.LoadLevel(0);
}
if (GUILayout.Button("截图"))
{
Application.CaptureScreenshot("VR5.pan");
}
}
12.png.png