private void Start() { TopLeft = transform.Find("TopLeft"); TopLeftText = TopLeft.GetComponentInChildren <Text>(); TopLeftOther = TopLeft.Find("Other"); TopRight = transform.Find("TopRight"); TopRightText = TopRight.GetComponentInChildren <Text>(); TopRightOther = TopRight.Find("Other"); BottomLeft = transform.Find("BottomLeft"); BottomLeftText = BottomLeft.GetComponentInChildren <Text>(); BottomLeftOther = BottomLeft.Find("Other"); BottomRight = transform.Find("BottomRight"); BottomRightText = BottomRight.GetComponentInChildren <Text>(); BottomRightOther = BottomRight.Find("Other"); WebRTCConn = ConnectionManager.Instance["WebRTC"] as WebRTCConnection; UltrasoundController = GameObject.Find("UltrasoundTracker").GetComponentInChildren <ARUWPController>(); Configurations.Instance.SetAndAddCallback("Billboard_StatusDebugMode", true, v => { Mode = v ? Modes.DEBUG : Mode = Modes.RUN; Clear(); }, Configurations.CallNow.YES, Configurations.RunOnMainThead.YES); Configurations.Instance.AddCallback("*_PrepareUI", () => Configurations.Instance.Set("Billboard_StatusDebugMode", false)); }
private void Update() { // Red if not connected // Yellow if connecting // Green if conntected WebRTCConnection conn = ConnectionManager.Instance["WebRTC"] as WebRTCConnection; switch (conn.Status) { case WebRTCConnection.Statuses.NotConnected: Color = Color.red; break; case WebRTCConnection.Statuses.Pending: Color = Color.yellow; break; case WebRTCConnection.Statuses.Connected: Color = Color.green; break; } }