文档

Unity Engine

Download Unity

Unity Engine

GetPlaybackEngineDirectory

Gets the path of the Player directory for a build target.
阅读时间2 分钟最后更新于 21 天前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

GetPlaybackEngineDirectory(BuildTarget, BuildOptions)

Gets the path of the Player directory for a build target.
public static string GetPlaybackEngineDirectory(BuildTarget target, BuildOptions options)

Parameters

The build target to get the Player directory for.

The build options for the Player.

Returns

Type

Description

stringThe path to the Player directory for the specified build target.

Remarks

For example,
Editor\Data\PlaybackEngines\AndroidPlayer
. The path can depend on BuildOptions.Development. If the build target isn't supported, this overload logs an error.

GetPlaybackEngineDirectory(BuildTarget, BuildOptions, bool)

Gets the path of the Player directory for a build target, with the option to suppress errors for unsupported targets.
public static string GetPlaybackEngineDirectory(BuildTarget target, BuildOptions options, bool assertUnsupportedPlatforms)

Parameters

The build target to get the Player directory for.

The build options for the Player.

assertUnsupportedPlatforms

Set to true to log an error if the build target isn't supported. Set to false to return an empty string instead.

Returns

Type

Description

stringThe path to the Player directory for the specified build target.

Remarks

For example,
Editor\Data\PlaybackEngines\AndroidPlayer
. The path can depend on BuildOptions.Development.

GetPlaybackEngineDirectory(BuildTargetGroup, BuildTarget, BuildOptions)

Gets the path of the Player directory for a build target in a build target group.
public static string GetPlaybackEngineDirectory(BuildTargetGroup buildTargetGroup, BuildTarget target, BuildOptions options)

Parameters

buildTargetGroup

The build target group that the build target belongs to.

The build target to get the Player directory for.

The build options for the Player.

Returns

Type

Description

stringThe path to the Player directory for the specified build target.

Remarks

For example,
Editor\Data\PlaybackEngines\AndroidPlayer
. The path can depend on BuildOptions.Development. If the build target isn't supported, this overload logs an error.

GetPlaybackEngineDirectory(BuildTargetGroup, BuildTarget, BuildOptions, bool)

Gets the path of the Player directory for a build target in a build target group, with the option to suppress errors for unsupported targets.
public static string GetPlaybackEngineDirectory(BuildTargetGroup buildTargetGroup, BuildTarget target, BuildOptions options, bool assertUnsupportedPlatforms)

Parameters

buildTargetGroup

The build target group that the build target belongs to.

The build target to get the Player directory for.

The build options for the Player.

assertUnsupportedPlatforms

Set to true to log an error if the build target isn't supported. Set to false to return an empty string instead.

Returns

Type

Description

stringThe path to the Player directory for the specified build target.

Remarks

For example,
Editor\Data\PlaybackEngines\AndroidPlayer
. The path can depend on BuildOptions.Development.