// Use this for initialization void Start() { //ARLogin.Instance.OnStopCamera.AddListener (ErrorInfo); loading.SetActive(true); _sureButton.onClick.AddListener(ErrorOnClick); _cameraDevice = FindObjectOfType <BaiduARWebCamera>(); Transform bg = transform.Find("ResetButton"); if (bg != null) { resetBtn = bg.GetComponent <RectTransform>(); _resetButton = bg.GetComponent <Button>(); _resetButton.onClick.AddListener(ResetOnClick); _arObjectTrackle = GameObject.FindObjectOfType <BaiduARObjectTrackable>(); } int adjustHeight = 0; ARDebug.Log("SystemInfo.deviceModel = " + SystemInfo.deviceModel); ARDebug.Log("SystemInfo.nam = " + SystemInfo.deviceName); if (ARUtils.IsIPhoneX()) { adjustHeight = 100; } if (null != resetBtn) { resetBtn.anchoredPosition3D = new Vector3(resetBtn.anchoredPosition3D.x, resetBtn.anchoredPosition3D.y + 2 * adjustHeight, resetBtn.anchoredPosition3D.z); } ; }
private void Start() { if (null == MenuPanel) { MenuPanel = GetComponent <RectTransform>(); } int adjustHeight = 0; if (ARUtils.IsIPhoneX()) { adjustHeight = 100; } MenuPanel.anchoredPosition3D = new Vector3(MenuPanel.anchoredPosition3D.x, MenuPanel.anchoredPosition3D.y - adjustHeight, MenuPanel.anchoredPosition3D.z); }