Version: 2017.1
Method group is Obsolete

Application.loadedLevelName

切换到手册
Obsolete public static string loadedLevelName ;

描述

上次加载的关卡的名称(只读)。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { print(Application.loadedLevelName); } }

请注意,此值仅由 Application.LoadLevel 和 Application.LoadLevelAsync 设置。Additive 版本会向当前关卡添加内容。