28 lines
696 B
C#
Raw Permalink Normal View History

2025-09-19 14:56:58 +05:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BulletHellTemplate
{
public class ToggleMenu : MonoBehaviour
{
public GameObject menuToToggle;
/// <summary>
/// Toggles the visibility of the menu GameObject when clicked.
/// </summary>
public void OnClickToggleMenu()
{
if (menuToToggle != null)
{
// Toggle the active state of the menu
menuToToggle.SetActive(!menuToToggle.activeSelf);
}
else
{
Debug.LogError("No menu GameObject is assigned to toggle.");
}
}
}
}