# ClearWithSkybox(bool, Camera)

> Clear the current render buffer with camera's skybox.

## Definition

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

```csharp
public static void ClearWithSkybox(bool clearDepth, Camera camera)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Should the depth buffer be cleared?**** (\[Camera]\(/engine/6000.7/script-reference/unityengine/camera)): Camera to get projection parameters and skybox from.

### Remarks

This draws skybox into the screen or the active [RenderTexture](/engine/6000.7/script-reference/unityengine/rendertexture.md). If the passed camera does not have custom [Skybox](/engine/6000.7/script-reference/unityengine/skybox.md) component, the global skybox from [RenderSettings](/engine/6000.7/script-reference/unityengine/rendersettings.md) will be used.

Additional Resources: [GL.Clear](/engine/6000.7/script-reference/unityengine/gl/clear.md).
