void EnvironmentProbeAnchorRemoved(AREnvironmentProbeAnchor anchorData) { if (probeAnchorMap.ContainsKey(anchorData.identifier)) { ReflectionProbeGameObject rpgo = probeAnchorMap [anchorData.identifier]; GameObject.Destroy(rpgo.gameObject); probeAnchorMap.Remove(anchorData.identifier); } }
void EnvironmentProbeAnchorAdded(AREnvironmentProbeAnchor anchorData) { ReflectionProbeGameObject go = GameObject.Instantiate <ReflectionProbeGameObject> (m_ReflectionProbePrefab); if (go != null) { //do coordinate conversion from ARKit to Unity go.transform.position = UnityARMatrixOps.GetPosition(anchorData.transform); go.transform.rotation = UnityARMatrixOps.GetRotation(anchorData.transform); probeAnchorMap [anchorData.identifier] = go; go.UpdateEnvironmentProbe(anchorData); } }