タイトルシーンの作成/UIボタンの使い方








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





【2020版】BallGame(全27回)
他のコースを見る







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





タイトルシーンの作成/UIボタンの使い方