プレーヤーのステータス⑥(リスタートボタンの作成)







リスタートボタン
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// ★(追加)
using UnityEngine.SceneManagement;
public class Restart : MonoBehaviour
{
// ★(追加)
// 先頭に「public」をつけること(ポイント)
public void OnRestartButtonClicked()
{
SceneManager.LoadScene("Main");
}
}




【2019版】Danmaku I(基礎1/全22回)
他のコースを見る






リスタートボタン
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// ★(追加)
using UnityEngine.SceneManagement;
public class Restart : MonoBehaviour
{
// ★(追加)
// 先頭に「public」をつけること(ポイント)
public void OnRestartButtonClicked()
{
SceneManager.LoadScene("Main");
}
}




プレーヤーのステータス⑥(リスタートボタンの作成)