Files
Crash-Course/Assets/Scripts/Game/MapSelect.cs

19 lines
365 B
C#
Raw Normal View History

2025-03-03 18:23:54 -05:00
using UnityEngine;
using UnityEngine.UI;
public class MapSelect : MonoBehaviour
{
private ToggleGroup maps;
private void Start()
{
maps = GetComponent<ToggleGroup>();
}
void Update() // Sets the map based on the selected toggle
2025-03-03 18:23:54 -05:00
{
Toggle toggle = maps.GetFirstActiveToggle();
GameManager.map = toggle.name;
}
}