mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-22 23:28:43 -05:00
31 lines
673 B
C#
31 lines
673 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using SO.Channels;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class DisableGroupUI : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField] private SimpleChannelSO finishedPlaceItemChannel;
|
||
|
|
||
|
[SerializeField] private List<GameObject> uiElements;
|
||
|
|
||
|
private void OnEnable()
|
||
|
{
|
||
|
finishedPlaceItemChannel.OnEventRaised += OnFinishedPlaceItem;
|
||
|
}
|
||
|
|
||
|
private void OnDisable()
|
||
|
{
|
||
|
finishedPlaceItemChannel.OnEventRaised -= OnFinishedPlaceItem;
|
||
|
}
|
||
|
|
||
|
private void OnFinishedPlaceItem()
|
||
|
{
|
||
|
foreach (var uiElement in uiElements)
|
||
|
{
|
||
|
uiElement.SetActive(false);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|