タイトルシーンに戻るルートを作る
![582e2518 e456 4ccb 92b5 a89413c4870d](https://codegenius.org/uploads/slide/image/9610/582e2518-e456-4ccb-92b5-a89413c4870d.jpeg)
![3d5cf26f c72d 4fe8 80e4 d4e74f22475e](https://codegenius.org/uploads/slide/image/9611/3d5cf26f-c72d-4fe8-80e4-d4e74f22475e.jpeg)
タイトルシーンに戻る
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// ★追加
using UnityEngine.SceneManagement;
public class ReturnToTitle : MonoBehaviour
{
public int timeCount;
void Start()
{
// (ポイント)設定した時間が経過すると「GoTitle」メソッドを呼び出す。
Invoke("GoTitle", timeCount);
}
void GoTitle()
{
SceneManager.LoadScene("Title");
}
}
![E30f85bd c873 40e0 a62e fa6d91e62b6a](https://codegenius.org/uploads/slide/image/9612/e30f85bd-c873-40e0-a62e-fa6d91e62b6a.jpeg)
![9831351b 85a8 425c 96de 0ba92650d4ba](https://codegenius.org/uploads/slide/image/9613/9831351b-85a8-425c-96de-0ba92650d4ba.jpeg)
![B18cb098 8bb9 40da 96d8 abc7b4924ebd](https://codegenius.org/uploads/slide/image/9614/b18cb098-8bb9-40da-96d8-abc7b4924ebd.jpeg)
![7f32394c 85ee 4ca6 a913 819f3549f59b](https://codegenius.org/uploads/slide/image/9615/7f32394c-85ee-4ca6-a913-819f3549f59b.jpeg)
【2022版】BallGame(全27回)
他のコースを見る![582e2518 e456 4ccb 92b5 a89413c4870d](https://codegenius.org/uploads/slide/image/9610/582e2518-e456-4ccb-92b5-a89413c4870d.jpeg)
![3d5cf26f c72d 4fe8 80e4 d4e74f22475e](https://codegenius.org/uploads/slide/image/9611/3d5cf26f-c72d-4fe8-80e4-d4e74f22475e.jpeg)
タイトルシーンに戻る
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// ★追加
using UnityEngine.SceneManagement;
public class ReturnToTitle : MonoBehaviour
{
public int timeCount;
void Start()
{
// (ポイント)設定した時間が経過すると「GoTitle」メソッドを呼び出す。
Invoke("GoTitle", timeCount);
}
void GoTitle()
{
SceneManager.LoadScene("Title");
}
}
![E30f85bd c873 40e0 a62e fa6d91e62b6a](https://codegenius.org/uploads/slide/image/9612/e30f85bd-c873-40e0-a62e-fa6d91e62b6a.jpeg)
![9831351b 85a8 425c 96de 0ba92650d4ba](https://codegenius.org/uploads/slide/image/9613/9831351b-85a8-425c-96de-0ba92650d4ba.jpeg)
![B18cb098 8bb9 40da 96d8 abc7b4924ebd](https://codegenius.org/uploads/slide/image/9614/b18cb098-8bb9-40da-96d8-abc7b4924ebd.jpeg)
![7f32394c 85ee 4ca6 a913 819f3549f59b](https://codegenius.org/uploads/slide/image/9615/7f32394c-85ee-4ca6-a913-819f3549f59b.jpeg)
タイトルシーンに戻るルートを作る