# RegisterGetBuildPlayerOptionsHandler(Func<BuildPlayerOptions, BuildPlayerOptions>)

> Register a delegate method to calculate BuildPlayerOptions that are passed to the build player handler. Registering a null value will restore default behavior, which is the equivalent of calling BuildPlayerWindow.DefaultBuildMethods.GetBuildPlayerOptions.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static void RegisterGetBuildPlayerOptionsHandler(Func<BuildPlayerOptions, BuildPlayerOptions> func)
```

### Parameters

**** (\[Func\<BuildPlayerOptions, BuildPlayerOptions>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): Delegate Func that takes a [BuildPlayerOptions](/engine/6000.3/script-reference/unityeditor/buildplayeroptions.md) parameter. The value passed into the delegate will represent default options. The return value will be passed to the default build player handler, or to a custom handler set with [BuildPlayerWindow.RegisterBuildPlayerHandler](/engine/6000.3/script-reference/unityeditor/buildplayerwindow/registerbuildplayerhandler.md).

### Remarks

If this delegate is registered and used in conjunction with the default build player handler, be sure to set [BuildPlayerOptions.scenes](/engine/6000.3/script-reference/unityeditor/buildplayeroptions/scenes.md), [BuildPlayerOptions.locationPathName](/engine/6000.3/script-reference/unityeditor/buildplayeroptions/locationpathname.md), and [BuildPlayerOptions.target](/engine/6000.3/script-reference/unityeditor/buildplayeroptions/target.md) before exiting for the build process to proceed correctly.
