📜  如何加载活动场景 unity - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:39.453000             🧑  作者: Mango

代码示例1
using UnityEngine.SceneManagement;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    void LoadScene()
    {
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
    }
}