void Start() { ARCamera = GameObject.FindWithTag("ARCamera").GetComponent <ARCameraController>(); if (ARCamera == null) { Debug.LogError("No ARCamera found, bring ARCamera prefab into the scene"); } ARRootCollider = gameObject.GetComponent <BoxCollider>(); }
void Start() { ARCamera = GameObject.FindWithTag("ARCamera").GetComponent <ARCameraController>(); if (ARCamera == null) { Debug.LogError("No ARCamera found, bring ARCamera prefab into the scene"); } ARRootCollider = gameObject.GetComponent <BoxCollider>(); childrenMeshes = gameObject.GetComponentsInChildren <Renderer>(); childrenBounds = new BoundingBox(); ARRootCollider.bounds.SetMinMax( new Vector3( childrenBounds.min_x, childrenBounds.min_y, childrenBounds.min_z ), new Vector3( childrenBounds.max_x, childrenBounds.max_y, childrenBounds.max_z ) ); }
private void Awake() { Instance = this; }