mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-23 07:38:33 -05:00
31 lines
782 B
C#
31 lines
782 B
C#
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|