# Editor.EditorUtility.CompileShader

## Overload 1

```csharp
static System.Threading.Tasks.Task<Results> CompileShader(string localPath, ShaderCompileOptions options, System.Threading.CancellationToken token = null)
```

Compile a fucking shader. Takes a .shader file and compiles it.

### Parameters

- `localPath` (`string`)
- `options` (`ShaderCompileOptions`)
- `token` (`System.Threading.CancellationToken`), default `null`

### Returns

`System.Threading.Tasks.Task<Results>`

## Overload 2

```csharp
static System.Threading.Tasks.Task<Results> CompileShader(BaseFileSystem fs, string localPath, ShaderCompileOptions options, System.Threading.CancellationToken token = null)
```

### Parameters

- `fs` (`BaseFileSystem`)
- `localPath` (`string`)
- `options` (`ShaderCompileOptions`)
- `token` (`System.Threading.CancellationToken`), default `null`

### Returns

`System.Threading.Tasks.Task<Results>`

Declared in [Editor.EditorUtility](/api/Editor.EditorUtility).
Assembly: `Sandbox.Tools`.
