void Update() { if (!TryGetTouchPosition(out Vector2 touchPosition)) { return; } if (m_RaycastManager.Raycast(touchPosition, s_Hits, TrackableType.PlaneWithinPolygon)) { // Raycast hits are sorted by distance, so the first one // will be the closest hit. var hitPose = s_Hits[0].pose; if (spawnedObject == null) { spawnedObject = Instantiate(m_PlacedPrefab, hitPose.position, hitPose.rotation); FloorSelect._instance.GetFloorNumber(spawnedObject); //SetupObjectSettings._instance.setBoxColliders(spawnedObject); var probePose = hitPose; probePose.position.y += 1.2f; m_Probe = m_ProbeManager.AddEnvironmentProbe(probePose, Vector3.one, Vector3.one); } //else //{ // spawnedObject.transform.position = hitPose.position; //} } }
static string ToString(AREnvironmentProbe probe) { return($"{probe.trackableId}: {probe.textureDescriptor}"); }