using System.Collections; using System.Collections.Generic; using SO.Channels; using UnityEngine; namespace Managers { public class ShowAndHideRefenceModelManager : MonoBehaviour { [SerializeField] private SimpleChannelSO showAndHideReferenceModelChannel; [SerializeField] private GameObject referenceModel; private void OnEnable() { showAndHideReferenceModelChannel.OnEventRaised += OnShowAndHideReferenceModel; } private void OnDisable() { showAndHideReferenceModelChannel.OnEventRaised -= OnShowAndHideReferenceModel; } private void OnShowAndHideReferenceModel() { referenceModel.SetActive(!referenceModel.activeSelf); } } }