using System.Collections; using System.Collections.Generic; using UnityEngine; public class HidePanelButton : MonoBehaviour { /// /// Cached reference to the PanelManager /// private PanelManager _panelManager; private void Start() { // Cache the manager _panelManager = PanelManager.Instance; } public void DoHidePanel() { // Hide the last panel _panelManager.HideLastPanel(); } }