# GetKeepUnusedCameraRenderingResources

> Each Camera has its own KeepUnusedRenderingResources setting, which is false by default. Unity uses this per-Camera setting in combination with the Terrain's overall KeepUnusedRenderingResources setting. If either setting is true, Unity preserves all rendering resources regardless of how long they've remained unused.

## Definition

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

## GetKeepUnusedCameraRenderingResources(EntityId)

Each Camera has its own `KeepUnusedRenderingResources` setting, which is `false` by default. Unity uses this per-Camera setting in combination with the Terrain's overall `KeepUnusedRenderingResources` setting. If either setting is `true`, Unity preserves all rendering resources regardless of how long they've remained unused.

```csharp
public bool GetKeepUnusedCameraRenderingResources(EntityId cameraEntityId)
```

### Parameters

**** (\[EntityId]\(/engine/6000.7/script-reference/unityengine/entityid)): The EntityId of the camera being queried. See [Object.GetEntityId()](/engine/6000.7/script-reference/unityengine/object/getentityid.md).

### Returns

| Type                                                          | Description                                                                                                                                                              |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns `true` if all rendering resources for the given camera are saved regardless of usage. Returns `false` if garbage collection is allowed to free unused resources. |

### Remarks

Additional Resources: [Terrain.SetKeepUnusedCameraRenderingResources](/engine/6000.7/script-reference/unityengine/terrain/setkeepunusedcamerarenderingresources.md), [\_keepUnusedRenderingResources](/engine/6000.7/script-reference/unityengine/terrain/keepunusedrenderingresources.md)

## GetKeepUnusedCameraRenderingResources(int)

Each Camera has its own `KeepUnusedRenderingResources` setting, which is `false` by default. Unity uses this per-Camera setting in combination with the Terrain's overall `KeepUnusedRenderingResources` setting. If either setting is `true`, Unity preserves all rendering resources regardless of how long they've remained unused.

> **Warning:**
>
> **Removed.** GetKeepUnusedCameraRenderingResources(int) is obsolete. Use GetKeepUnusedCameraRenderingResources(EntityId) instead.

```csharp
public bool GetKeepUnusedCameraRenderingResources(int cameraInstanceID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The InstanceID of the camera being queried. See [Object.GetInstanceID()](/engine/6000.7/script-reference/unityengine/object/getinstanceid.md).

### Returns

| Type                                                          | Description                                                                                                                                                              |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns `true` if all rendering resources for the given camera are saved regardless of usage. Returns `false` if garbage collection is allowed to free unused resources. |

### Remarks

Additional Resources: [Terrain.SetKeepUnusedCameraRenderingResources](/engine/6000.7/script-reference/unityengine/terrain/setkeepunusedcamerarenderingresources.md), [\_keepUnusedRenderingResources](/engine/6000.7/script-reference/unityengine/terrain/keepunusedrenderingresources.md)
