# ReflectionProbe

> The reflection probe is used to capture the surroundings into a texture which is passed to the shaders and used for reflections.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule
* **Inherits from:** [Behaviour](/engine/6000.7/script-reference/unityengine/behaviour.md)

```csharp
public sealed class ReflectionProbe : Behaviour
```

## Remarks

The properties are an exact match for the values shown in the Inspector.

This class is a script interface for a [reflection probe](/engine/6000.7/manual/lighting-overview/reflections/class-reflection-probe.md) component.

Reflection probes are usually just created in the Editor, but sometimes you might want to create a reflection probe from a script:

## Examples

```csharp
using UnityEngine;
using UnityEditor;

public class ProbeCreator
{
    [MenuItem("ReflectionProbe/CreateRealtimeProbe")]
    public static void RealtimeProbe()
    {
        // Add a GameObject with a ReflectionProbe component
        GameObject probeGameObject = new GameObject("Realtime Reflection Probe");
        ReflectionProbe probeComponent = probeGameObject.AddComponent<ReflectionProbe>();

        // The probe will contribute to reflections inside a box of size 10x10x10 centered on the position of the probe
        probeComponent.size = new Vector3(10, 10, 10);

        // Set the type to realtime and refresh the probe every frame
        probeComponent.mode = UnityEngine.Rendering.ReflectionProbeMode.Realtime;
        probeComponent.refreshMode = UnityEngine.Rendering.ReflectionProbeRefreshMode.EveryFrame;
    }
}
```

## Properties

| Property                                                                                                        | Description                                                                                                                                                                                                                                                                                                                                                                          |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [backgroundColor](/engine/6000.7/script-reference/unityengine/reflectionprobe/backgroundcolor.md)               | The color with which the texture of reflection probe will be cleared.                                                                                                                                                                                                                                                                                                                |
| [bakedTexture](/engine/6000.7/script-reference/unityengine/reflectionprobe/bakedtexture.md)                     | Reference to the baked texture of the reflection probe's surrounding.                                                                                                                                                                                                                                                                                                                |
| [blendDistance](/engine/6000.7/script-reference/unityengine/reflectionprobe/blenddistance.md)                   | Distance around probe used for blending (used in deferred probes).                                                                                                                                                                                                                                                                                                                   |
| [bounds](/engine/6000.7/script-reference/unityengine/reflectionprobe/bounds.md)                                 | The probe's world space axis-aligned bounding box in which the probe can contribute to reflections (Read Only).                                                                                                                                                                                                                                                                      |
| [boxProjection](/engine/6000.7/script-reference/unityengine/reflectionprobe/boxprojection.md)                   | Should this reflection probe use box projection?                                                                                                                                                                                                                                                                                                                                     |
| [center](/engine/6000.7/script-reference/unityengine/reflectionprobe/center.md)                                 | The center of the probe's bounding box in which the probe can contribute to reflections. The center is relative to the position of the probe.                                                                                                                                                                                                                                        |
| [clearFlags](/engine/6000.7/script-reference/unityengine/reflectionprobe/clearflags.md)                         | How the reflection probe clears the background.                                                                                                                                                                                                                                                                                                                                      |
| [cullingMask](/engine/6000.7/script-reference/unityengine/reflectionprobe/cullingmask.md)                       | This is used to render parts of the reflecion probe's surrounding selectively.                                                                                                                                                                                                                                                                                                       |
| [customBakedTexture](/engine/6000.7/script-reference/unityengine/reflectionprobe/custombakedtexture.md)         | Reference to the baked texture of the reflection probe's surrounding. Use this to assign custom reflection texture.                                                                                                                                                                                                                                                                  |
| [exposureValue](/engine/6000.7/script-reference/unityengine/reflectionprobe/exposurevalue.md)                   | The exposure value at capture time. When the scene's exposure differs from this value, the probe's contribution is re-exposed to match. This property is used only in URP.                                                                                                                                                                                                           |
| [farClipPlane](/engine/6000.7/script-reference/unityengine/reflectionprobe/farclipplane.md)                     | The far clipping plane distance when rendering the probe.                                                                                                                                                                                                                                                                                                                            |
| [hdr](/engine/6000.7/script-reference/unityengine/reflectionprobe/hdr.md)                                       | Should this reflection probe use HDR rendering?                                                                                                                                                                                                                                                                                                                                      |
| [importance](/engine/6000.7/script-reference/unityengine/reflectionprobe/importance.md)                         | Reflection probe importance.                                                                                                                                                                                                                                                                                                                                                         |
| [intensity](/engine/6000.7/script-reference/unityengine/reflectionprobe/intensity.md)                           | The intensity modifier that is applied to the texture of reflection probe in the shader.                                                                                                                                                                                                                                                                                             |
| [mode](/engine/6000.7/script-reference/unityengine/reflectionprobe/mode.md)                                     | Should reflection probe texture be generated in the Editor ([ReflectionProbeMode.Baked](/engine/6000.7/script-reference/unityengine/rendering/reflectionprobemode/baked.md)) or should probe use custom specified texure ([ReflectionProbeMode.Custom](/engine/6000.7/script-reference/unityengine/rendering/reflectionprobemode/custom.md))?                                        |
| [nearClipPlane](/engine/6000.7/script-reference/unityengine/reflectionprobe/nearclipplane.md)                   | The near clipping plane distance when rendering the probe.                                                                                                                                                                                                                                                                                                                           |
| [realtimeTexture](/engine/6000.7/script-reference/unityengine/reflectionprobe/realtimetexture.md)               | Reference to the real-time texture of the reflection probe's surroundings. Use this to assign a [RenderTexture](/engine/6000.7/script-reference/unityengine/rendertexture.md) to use for real-time reflection.                                                                                                                                                                       |
| [refreshMode](/engine/6000.7/script-reference/unityengine/reflectionprobe/refreshmode.md)                       | Sets the way the probe will refresh.                                                                                                                                                                                                                                                                                                                                                 |
| [renderDynamicObjects](/engine/6000.7/script-reference/unityengine/reflectionprobe/renderdynamicobjects.md)     | Specifies whether Unity should render non-static GameObjects into the Reflection Probe. If you set this to `true`, Unity renders non-static GameObjects into the Reflection Probe. If you set this to `false`, Unity does not render non-static GameObjects into the Reflection Probe. Unity only takes this property into account if the Reflection Probe's **Type** is **Custom**. |
| [resolution](/engine/6000.7/script-reference/unityengine/reflectionprobe/resolution.md)                         | Resolution of the underlying reflection texture in pixels.                                                                                                                                                                                                                                                                                                                           |
| [shadowDistance](/engine/6000.7/script-reference/unityengine/reflectionprobe/shadowdistance.md)                 | Shadow drawing distance when rendering the probe.                                                                                                                                                                                                                                                                                                                                    |
| [size](/engine/6000.7/script-reference/unityengine/reflectionprobe/size.md)                                     | The size of the probe's bounding box in which the probe can contribute to reflections. The size is in world space.                                                                                                                                                                                                                                                                   |
| [texture](/engine/6000.7/script-reference/unityengine/reflectionprobe/texture.md)                               | Texture which is passed to the shader of the objects in the vicinity of the reflection probe (Read Only).                                                                                                                                                                                                                                                                            |
| [textureHDRDecodeValues](/engine/6000.7/script-reference/unityengine/reflectionprobe/texturehdrdecodevalues.md) | HDR decode values of the reflection probe texture.                                                                                                                                                                                                                                                                                                                                   |
| [timeSlicingMode](/engine/6000.7/script-reference/unityengine/reflectionprobe/timeslicingmode.md)               | Sets this probe time-slicing mode                                                                                                                                                                                                                                                                                                                                                    |

## Static Properties

| Property                                                                                                                      | Description                                                                                                |
| ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| [defaultTexture](/engine/6000.7/script-reference/unityengine/reflectionprobe/defaulttexture.md)                               | The surface texture of the default reflection probe that captures the environment contribution. Read only. |
| [defaultTextureHDRDecodeValues](/engine/6000.7/script-reference/unityengine/reflectionprobe/defaulttexturehdrdecodevalues.md) | HDR decode values of the default reflection probe texture.                                                 |

## Methods

| Method                                                                                                    | Description                                          |
| --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| [IsFinishedRendering](/engine/6000.7/script-reference/unityengine/reflectionprobe/isfinishedrendering.md) | Checks if a probe has finished a time-sliced render. |
| [RenderProbe](/engine/6000.7/script-reference/unityengine/reflectionprobe/renderprobe.md)                 | Refreshes the probe's cubemap.                       |
| [Reset](/engine/6000.7/script-reference/unityengine/reflectionprobe/reset.md)                             | Revert all ReflectionProbe parameters to default.    |

## Static Methods

| Method                                                                                                | Description                                                                                                                                                                                            |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [BlendCubemap](/engine/6000.7/script-reference/unityengine/reflectionprobe/blendcubemap.md)           | Utility method to blend 2 cubemaps into a target render texture.                                                                                                                                       |
| [UpdateCachedState](/engine/6000.7/script-reference/unityengine/reflectionprobe/updatecachedstate.md) | Updates the culling system with the ReflectionProbe's current state. This ensures that Unity correctly culls the ReflectionProbe during rendering if you implement your own runtime reflection system. |

## Static Events

| Member                                                                                                              | Description                                                                                               |
| ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| [defaultReflectionTexture](/engine/6000.7/script-reference/unityengine/reflectionprobe/defaultreflectiontexture.md) | Adds a delegate to get notifications when the default specular Cubemap is changed.                        |
| [reflectionProbeChanged](/engine/6000.7/script-reference/unityengine/reflectionprobe/reflectionprobechanged.md)     | Adds a delegate to get notifications when a Reflection Probe is added to a Scene or removed from a Scene. |

## Enums

| Enum                                                                                                                        | Description                                                                     |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [ReflectionProbe.ReflectionProbeEvent](/engine/6000.7/script-reference/unityengine/reflectionprobe/reflectionprobeevent.md) | Types of events that occur when ReflectionProbe components are used in a Scene. |

## Inheritance

**Inherited Members:**

* [Behaviour.enabled](/engine/6000.7/script-reference/unityengine/behaviour/enabled.md)
* [Behaviour.isActiveAndEnabled](/engine/6000.7/script-reference/unityengine/behaviour/isactiveandenabled.md)
* [Component.GetComponent(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponent.md#getcomponent\(type\))
* [Component.GetComponent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponent.md)
* [Component.TryGetComponent(Type, Component)](/engine/6000.7/script-reference/unityengine/component/trygetcomponent.md)
* [Component.TryGetComponent\<T>(T)](/engine/6000.7/script-reference/unityengine/component/trygetcomponent.md)
* [Component.GetComponent(string)](/engine/6000.7/script-reference/unityengine/component/getcomponent.md#getcomponent\(string\))
* [Component.GetComponentInChildren(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md#getcomponentinchildren\(type-bool\))
* [Component.GetComponentInChildren(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md#getcomponentinchildren\(type\))
* [Component.GetComponentInChildren\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md)
* [Component.GetComponentsInChildren(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentsInChildren\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md#getcomponentsinchildrent\(bool\))
* [Component.GetComponentsInChildren\<T>(bool, List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentsInChildren\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md#getcomponentsinchildrent\(\))
* [Component.GetComponentsInChildren\<T>(List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentInParent(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparent\(type-bool\))
* [Component.GetComponentInParent(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparent\(type\))
* [Component.GetComponentInParent\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparentt\(bool\))
* [Component.GetComponentInParent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparentt\(\))
* [Component.GetComponentsInParent(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md)
* [Component.GetComponentsInParent\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md#getcomponentsinparentt\(bool\))
* [Component.GetComponentsInParent\<T>(bool, List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md)
* [Component.GetComponentsInParent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md#getcomponentsinparentt\(\))
* [Component.GetComponents(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponents\(type\))
* [Component.GetComponents(Type, List\<Component>)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponents\(type-listcomponent\))
* [Component.GetComponents\<T>(List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md)
* [Component.GetComponents\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponentst\(\))
* [Component.GetComponentIndex()](/engine/6000.7/script-reference/unityengine/component/getcomponentindex.md)
* [Component.CompareTag(string)](/engine/6000.7/script-reference/unityengine/component/comparetag.md#comparetag\(string\))
* [Component.CompareTag(TagHandle)](/engine/6000.7/script-reference/unityengine/component/comparetag.md#comparetag\(taghandle\))
* [Component.SendMessageUpwards(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessageupwards.md#sendmessageupwards\(string-object-sendmessageoptions\))
* [Component.SendMessageUpwards(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessageupwards.md#sendmessageupwards\(string-sendmessageoptions\))
* [Component.SendMessage(string, Object)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-object\))
* [Component.SendMessage(string)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string\))
* [Component.SendMessage(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-object-sendmessageoptions\))
* [Component.SendMessage(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-sendmessageoptions\))
* [Component.BroadcastMessage(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/broadcastmessage.md#broadcastmessage\(string-object-sendmessageoptions\))
* [Component.BroadcastMessage(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/broadcastmessage.md#broadcastmessage\(string-sendmessageoptions\))
* [Component.transform](/engine/6000.7/script-reference/unityengine/component/transform.md)
* [Component.transformHandle](/engine/6000.7/script-reference/unityengine/component/transformhandle.md)
* [Component.gameObject](/engine/6000.7/script-reference/unityengine/component/gameobject.md)
* [Component.tag](/engine/6000.7/script-reference/unityengine/component/tag.md)
* [Object.GetEntityId()](/engine/6000.7/script-reference/unityengine/object/getentityid.md)
* [Object.GetHashCode()](/engine/6000.7/script-reference/unityengine/object/gethashcode.md)
* [Object.InstantiateAsync\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.Instantiate(Object, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion\))
* [Object.Instantiate(Object, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion-transform\))
* [Object.Instantiate(Object)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object\))
* [Object.Instantiate(Object, Scene)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-scene\))
* [Object.Instantiate\<T>(T, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate(Object, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform\))
* [Object.Instantiate(Object, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform-bool\))
* [Object.Instantiate\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Destroy(Object, float)](/engine/6000.7/script-reference/unityengine/object/destroy.md)
* [Object.DestroyImmediate(Object, bool)](/engine/6000.7/script-reference/unityengine/object/destroyimmediate.md)
* [Object.FindObjectsByType(Type)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type\))
* [Object.FindObjectsByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type-findobjectsinactive\))
* [Object.DontDestroyOnLoad(Object)](/engine/6000.7/script-reference/unityengine/object/dontdestroyonload.md)
* [Object.FindAnyObjectByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(\))
* [Object.FindAnyObjectByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(findobjectsinactive\))
* [Object.FindObjectsByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(\))
* [Object.FindObjectsByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(findobjectsinactive\))
* [Object.FindAnyObjectByType(Type)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type\))
* [Object.FindAnyObjectByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type-findobjectsinactive\))
* [Object.ToString()](/engine/6000.7/script-reference/unityengine/object/tostring.md)
* [Object.name](/engine/6000.7/script-reference/unityengine/object/name.md)
* [Object.hideFlags](/engine/6000.7/script-reference/unityengine/object/hideflags.md)

### Operators

| Operator                                                                           | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [operator ==](/engine/6000.7/script-reference/unityengine/object/op-equality.md)   | Compares two object references to see if they refer to the same object. |
| [bool](/engine/6000.7/script-reference/unityengine/object/op-implicit.md)          | Determines whether the object exists.                                   |
| [operator !=](/engine/6000.7/script-reference/unityengine/object/op-inequality.md) | Compares if two objects refer to a different object.                    |
