using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class restart : MonoBehaviour
{
void Update()
{
if (Input.GetKey(KeyCode.Space))
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
}
}
'Unity > C#' 카테고리의 다른 글
텍스쳐를 자동으로 설정해봅시다. (0) | 2020.12.06 |
---|---|
유니티의 Object 이해 (0) | 2020.12.06 |
캐릭터 랜덤 모션 (0) | 2020.11.02 |
EditorWindow (0) | 2020.10.30 |
간단한 애니메이션 스크립트 (0) | 2020.09.08 |