Replace legacy UI components with TextMeshPro for improved text rendering and flexibility. Update component references and properties to ensure compatibility with the new text system. This change enhances visual quality and performance in the menu scene.
23 lines
529 B
C#
23 lines
529 B
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class MenuGroup : MonoBehaviour
|
|
{
|
|
[SerializeField] private string singleplayerScene = "LocalTestMap"; // Name of the scene to load
|
|
|
|
public void QuitGame()
|
|
{
|
|
Application.Quit();
|
|
}
|
|
|
|
// TypeGameBtnGroup
|
|
public void Singleplayer()
|
|
{
|
|
SceneManager.LoadScene(singleplayerScene, LoadSceneMode.Single);
|
|
}
|
|
public void Multiplayer()
|
|
{
|
|
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
|
|
}
|
|
}
|