using System; using System.Collections; using System.Collections.Generic; using Sirenix.OdinInspector; using UnityEngine; public class GameObjectToggler : MonoBehaviour { [SerializeField] private GameObject goToToggle; [SerializeField] private bool defaultActiveState = true; private void OnEnable() { goToToggle.SetActive(defaultActiveState); } [Button] public void Toggle() { goToToggle.SetActive(!goToToggle.activeSelf); } }