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






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










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





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










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