Пример #1
0
        private void Start()
        {
#if UNITY_EDITOR
            Debug.Log("UNITY_EDITOR Start");
#endif
            var inputPanel = InputPanel.GetComponent <InputPanel>();
            inputPanel.Activate(null);
            FixedDeviceLatitude  = inputPanel.GetLatitude();
            FixedDeviceLongitude = inputPanel.GetLongitude();

#if HAS_AR_CORE
#else
#if HAS_AR_KIT
#else
            ArCamera.GetComponent <VuforiaBehaviour>().enabled = true;
            VuforiaRuntime.Instance.InitVuforia();
#endif
#endif

#if UNITY_IOS_unused
            if (dontDestroyOnLoad)
            {
                DontDestroyOnLoad(this.gameObject);
            }
            DeepLinkReceiverIsAlive(); // Let the App Controller know it's ok to call URLOpened now.
#endif


            // Start GetPosition() coroutine
            StartCoroutine("GetPosition");
            // Start GetData() coroutine
            StartCoroutine("GetData");
        }
Пример #2
0
        public override void HandleMenuButtonClick()
        {
            if (InputPanelEnabled)
            {
                var second = DateTime.Now.Ticks / 10000000L;
                if (_lastButtonSecond == second)
                {
                    InputPanel.SetActive(true);
                    var inputPanel = InputPanel.GetComponent <InputPanel>();
                    inputPanel.Activate(this);
                    return;
                }
                _lastButtonSecond = second;
            }

            List <ArItem> itemList = LayerItemList;

            if (MenuEnabled.HasValue && MenuEnabled.Value && itemList != null && itemList.Any())
            {
                if (_layerScrollList != null)
                {
                    _layerScrollList.RemoveButtons();
                }

                _layerScrollList = new ArLayerScrollList(ContentPanel, ButtonObjectPool);
                _layerScrollList.AddButtons(itemList, this);

                InputPanel.SetActive(false);
                HeaderButton.SetActive(false);
                MenuButton.SetActive(false);
                LayerPanel.SetActive(true);
            }
        }
Пример #3
0
 public void HandlePanelHeaderButtonClick()
 {
     if (MenuEnabled.HasValue && MenuEnabled.Value)
     {
         HeaderButton.SetActive(_headerButtonActivated);
         MenuButton.SetActive(MenuEnabled.HasValue && MenuEnabled.Value);
         LayerPanel.SetActive(false);
         if (_layerScrollList != null)
         {
             _layerScrollList.RemoveButtons();
         }
     }
     if (InputPanelEnabled)
     {
         var second = DateTime.Now.Ticks / 10000000L;
         if (_lastButtonSecond == second)
         {
             InputPanel.SetActive(true);
             InputPanel inputPanel = InputPanel.GetComponent <InputPanel>();
             inputPanel.Activate(this);
         }
         _lastButtonSecond = second;
     }
 }