/// <summary>
 /// Constructs the instance and sets the UI as a sibling of the transform passed.
 /// </summary>
 /// <param name="parent"></param>
 public MetaSensorUiController()
 {
     _controller = CreateMessageUi();
     _manager    = GameObject.FindObjectOfType <MetaManager>();
     _controller.FadeToAlphaOverSeconds(0f, 0.01f);
     _controller.gameObject.SetActive(false);
 }
Beispiel #2
0
        /// <summary>
        /// Handles assignment/removal of the canvas shown in place of the Webcam.
        /// </summary>
        /// <param name="changedToMode"></param>
        private void Start()
        {
            _sensorController = GetComponentInChildren <MetaSensorMessageController>();

            _slamLocalizer = GetComponent <SlamLocalizer>();
            _slamLocalizer.onSlamSensorsReady.AddListener(SlamInitCallback);

            Screen.SetResolution(1280, 720, false);
            _controller = ConstructCanvas();

            _compositor = GetComponent <MetaCompositor>();

            StartCoroutine(SetMessage());
        }
Beispiel #3
0
 /// <summary>
 /// Set the title text to the current slam message.
 /// </summary>
 private void SetSlamMessage()
 {
     if (_sensorController == null)
     {
         _sensorController = GetComponentInChildren <MetaSensorMessageController>();
     }
     else
     {
         if (_slamContent == null)
         {
             _slamContent = _sensorController.GetComponentInChildren <Text>();
         }
         else
         {
             _controller.SetMessage(_slamContent.text);
         }
     }
 }