# IsActive(LightProbes)

> Indicates whether the LightProbes object is currently registered for use in rendering.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static bool IsActive(LightProbes lightProbes)
```

### Parameters

**** (\[LightProbes]\(/engine/6000.7/script-reference/unityengine/lightprobes)): The `LightProbes` object to query for its active status.

### Returns

| Type                                                          | Description                                                            |
| ------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the reference count is greater than zero; otherwise `false`. |

### Remarks

An object becomes active after a call to [LightProbes.Append](/engine/6000.7/script-reference/unityengine/lightprobes/append.md), and remains active until a corresponding number of [LightProbes.Remove](/engine/6000.7/script-reference/unityengine/lightprobes/remove.md) calls bring its reference count back to zero. While inactive, the object is not registered for use in rendering. Loading or unloading a scene that contains light probes has the same effect, because Unity calls [LightProbes.Append](/engine/6000.7/script-reference/unityengine/lightprobes/append.md) and [LightProbes.Remove](/engine/6000.7/script-reference/unityengine/lightprobes/remove.md) automatically for the `LightProbes` objects belonging to that scene.

Additional Resources: [LightProbes.Append](/engine/6000.7/script-reference/unityengine/lightprobes/append.md), [LightProbes.Remove](/engine/6000.7/script-reference/unityengine/lightprobes/remove.md), [LightProbes.GetReferenceCount](/engine/6000.7/script-reference/unityengine/lightprobes/getreferencecount.md).

### Examples

```csharp
// Attach this script to a GameObject, then enter Play mode.
// The script appends a LightProbes object twice, then removes it, logging whether
// it is active at each step so you can observe when it is registered for rendering.

using UnityEngine;
using UnityEngine.Rendering;

public class IsActiveExample : MonoBehaviour
{
    void Start()
    {
        LightProbes probes = new LightProbes(1);
        probes.SetPositionsSelf(new Vector3[] { transform.position }, false);
        probes.SetSHCoefficientsSelf(new SphericalHarmonicsL2[1]);

        LightProbes.Append(probes);
        LightProbes.Append(probes);
        Debug.Log($"After two Append calls: {LightProbes.IsActive(probes)}");

        LightProbes.Remove(probes);
        Debug.Log($"After one Remove call: {LightProbes.IsActive(probes)}");

        LightProbes.Remove(probes);
        Debug.Log($"After two Remove calls: {LightProbes.IsActive(probes)}");

        LightProbes.Tetrahedralize();
    }
}
```
