using System.Collections; using System.Collections.Generic; using SO.Channels; using UnityEngine; public class DisableGroupUI : MonoBehaviour { [SerializeField] private SimpleChannelSO finishedPlaceItemChannel; [SerializeField] private List uiElements; private void OnEnable() { finishedPlaceItemChannel.OnEventRaised += OnFinishedPlaceItem; } private void OnDisable() { finishedPlaceItemChannel.OnEventRaised -= OnFinishedPlaceItem; } private void OnFinishedPlaceItem() { foreach (var uiElement in uiElements) { uiElement.SetActive(false); } } }