# RequestScriptCompilation

> Requests that the Unity Editor recompile any scripts that changed.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Compilation](/engine/7000.0/script-reference/unityeditor/compilation.md)
* **Assembly:** UnityEditor.CoreModule

## RequestScriptCompilation()

Requests that the Unity Editor recompile any scripts that changed.

```csharp
public static void RequestScriptCompilation()
```

### Remarks

When you call this method, the Unity Editor checks whether any scripts, or settings that affect script compilation, have changed, and recompiles the scripts that need it. If the compilation succeeds, the Editor reloads all assemblies. To recompile all scripts even if nothing changed, use the overload that takes [RequestScriptCompilationOptions](/engine/7000.0/script-reference/unityeditor/compilation/requestscriptcompilationoptions.md).

## RequestScriptCompilation(RequestScriptCompilationOptions)

Requests that the Unity Editor recompile scripts, with the option to clear the build cache and recompile everything.

```csharp
public static void RequestScriptCompilation(RequestScriptCompilationOptions options)
```

### Parameters

**** (\[RequestScriptCompilationOptions]\(/engine/7000.0/script-reference/unityeditor/compilation/requestscriptcompilationoptions)): Whether to clear the build cache before compilation. Pass [RequestScriptCompilationOptions.CleanBuildCache](/engine/7000.0/script-reference/unityeditor/compilation/requestscriptcompilationoptions/cleanbuildcache.md) to recompile all scripts, even if nothing changed.

### Remarks

When you call this method, the Unity Editor checks whether any scripts, or settings that affect script compilation, have changed, and recompiles the scripts that need it. If the compilation succeeds, the Editor reloads all assemblies.

You might want to recompile all scripts in the following situations:

* You have a successful compilation, but want to see all compiler warnings again.
* The compilation pipeline takes input from files that Unity can't track. This can happen in rare cases when you use response files.
* You suspect a bug in the compilation pipeline that stops it from picking up changes.
