Tanoda
VRMonitorPopupManager.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using GILES;
4using UnityEngine;
6using UnityEngine.UI;
7using UnityEngine.Video;
8
9public class VRMonitorPopupManager : pb_MonoBehaviourSingleton<VRMonitorPopupManager>
10{
11 public VideoPlayer vp;
12 public Image image;
13 public Text text;
14 public UnityEvent onMonitorClicked;
15
16 public void TriggerCallback(Collider other)
17 {
18#if !UNITY_WEBGL
19 if (other.gameObject.GetComponentInParent<HackedHand>())
20 {
21 onMonitorClicked.Invoke();
22 }
23#endif
24 }
25
26 public void ChangeMonitorText(string value)
27 {
28 text.text = value;
29 text.transform.parent.gameObject.SetActive(true);
30 vp.gameObject.SetActive(false);
31 image.gameObject.SetActive(false);
32 }
33
34 public void ChangeMonitorImage(Sprite value)
35 {
36 text.transform.parent.gameObject.SetActive(false);
37 vp.gameObject.SetActive(false);
38 image.gameObject.SetActive(true);
39 image.sprite = value;
40 }
41
42 public void ChangeMonitorVideo(VideoClip value)
43 {
44 text.transform.parent.gameObject.SetActive(false);
45 vp.gameObject.SetActive(true);
46 image.gameObject.SetActive(false);
47 vp.clip = value;
48 }
49}
System.Drawing.Image Image
Definition: TestScript.cs:37
void TriggerCallback(Collider other)
void ChangeMonitorText(string value)
void ChangeMonitorImage(Sprite value)
void ChangeMonitorVideo(VideoClip value)