Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

BuildPlayerWindow.RegisterGetBuildPlayerOptionsHandler

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

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

Parameters

func Delegate System.Func that takes a BuildPlayerOptions 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.

Description

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.

If this delegate is registered and used in conjunction with the default build player handler, be sure to set BuildPlayerOptions.scenes, BuildPlayerOptions.locationPathName, and BuildPlayerOptions.target before exiting for the build process to proceed correctly.