// 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); } ; }
// Use this for initialization void Start() { _target = transform.gameObject; _arObjectTrackle = transform.GetComponent <BaiduARObjectTrackable>(); _cameraDevice = FindObjectOfType <BaiduARWebCamera> (); canvas = GameObject.Find("Canvas"); }