I hope I was able to help you with this video, if that's the case, I would be very happy for a rating and a comment, thank you very much!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tutorial : MonoBehaviour
{
public GameObject Inventory;
public void Start()
{
Inventory.gameObject.SetActive(false);
}
public void Switch()
{
if (Inventory.activeSelf == false) Inventory.SetActive(true);
else Inventory.SetActive(false);
}
}