/// <summary> /// Check the intersections between reflection probes and image-based lighting objects. /// </summary> public void CheckIntersection() { if (_objectList != null) { object[] objects = _objectList.ToArray(); for (int i = 0; i < _probeList.Count; i++) { ReflectionProbe probe = (ReflectionProbe)_probeList[i]; probe.ClearList(); //Clear old list. for (int j = 0; j < objects.Length; j++) { GameObject obj = (GameObject)objects[j]; // Use InfluenceRadius to determine the intersection. bool intersect = probe._influenceRadius.bounds.Intersects(obj.renderer.bounds); if (intersect) { // Add the object to a reflection probe, so the reflection probe can set reflection parameters to this object. probe.AddObject(obj); } } } } }