/****************************************************************************
* Copyright 2019 Nreal Techonology Limited. All rights reserved.
*
* This file is part of NRSDK.
*
* https://www.nreal.ai/
*
*****************************************************************************/
namespace NRKernal.Experimental.StreammingCast
{
using UnityEngine;
using UnityEngine.UI;
/// An observer view custom virtual display.
public class ObserverViewCustomVirtualDisplay : MonoBehaviour
{
/// The show control.
public Button showBtn;
/// The hide control.
public Button hideBtn;
/// The base controller panel.
public GameObject baseControllerPanel;
/// Starts this object.
private void Start()
{
showBtn.onClick.AddListener(() => { SetBaseControllerEnabled(true); });
hideBtn.onClick.AddListener(() => { SetBaseControllerEnabled(false); });
}
/// Sets base controller enabled.
/// True if is enabled, false if not.
private void SetBaseControllerEnabled(bool isEnabled)
{
baseControllerPanel.SetActive(isEnabled);
}
}
}