Player Settings 是您为即将在 Unity 中构建的最终游戏定义各种参数的地方。其中一些值将用于您打开独立平台游戏时所启动的分辨率对话框。
accelerometerFrequency | 加速度计更新频率。 |
actionOnDotNetUnhandledException | 针对未经处理的 .NET 异常设置崩溃行为。 |
advancedLicense | 使用的是否为高级版本? |
allowedAutorotateToLandscapeLeft | 是否支持自动旋转到左侧横向模式? |
allowedAutorotateToLandscapeRight | 是否支持自动旋转到右侧横向模式? |
allowedAutorotateToPortrait | 是否支持自动旋转到纵向模式? |
allowedAutorotateToPortraitUpsideDown | 是否支持自动旋转到纵向倒置模式? |
allowFullscreenSwitch | 如启用,则允许用户使用特定于操作系统的键盘快捷键在全屏模式和窗口模式之间切换。 |
allowUnsafeCode | 允许为预定义的程序集编译 'unsafe' C# 代码。 |
aotOptions | 其他 AOT 编译选项。由 AOT 平台共享。 |
applicationIdentifier | 当前所选构建目标的应用程序标识符。 |
assemblyVersionValidation | Set to true to exact version matching for strong named assemblies. |
bakeCollisionMeshes | 在播放器构建时预烘焙碰撞网格。 |
bundleVersion | iOS 和 Android 平台之间共享的应用程序捆绑包版本。 |
captureSingleScreen | 定义全屏游戏是否应使辅助显示变暗。 |
colorSpace | 设置当前项目的渲染颜色空间。 |
companyName | 您公司的名称。 |
cursorHotspot | 默认光标单击位置(以像素为单位),位于光标图像的左上角。 |
D3DHDRBitDepth | 每个颜色通道中用于交换链缓冲区的位数。(Direct3D 11 和 Direct3D 12 模式)。 |
defaultCursor | 应用程序的默认光标。 |
defaultInterfaceOrientation | 移动平台的默认屏幕方向。 |
defaultScreenHeight | 独立平台播放器窗口的默认垂直尺寸。 |
defaultScreenWidth | 独立平台播放器窗口的默认水平尺寸。 |
defaultWebScreenHeight | Web 播放器窗口的默认垂直尺寸。 |
defaultWebScreenWidth | Web 播放器窗口的默认水平尺寸。 |
enable360StereoCapture | 在当前构建目标上启用 360 度立体捕获支持。 |
enableCrashReportAPI | 启用 CrashReport API。 |
enableFrameTimingStats | 启用帧计时统计。 |
enableInternalProfiler | 启用内部性能分析器。 |
enableMetalAPIValidation | 在编辑器中启用 Metal API 验证。 |
forceSingleInstance | 将独立平台播放器限制为单个并发运行实例。 |
fullScreenMode | 用于定义全屏行为的平台无关性设置。并不是所有平台都支持所有模式。 |
gcIncremental | 用于启用或禁用垃圾收集增量模式。 |
gpuSkinning | 在支持的平台上启用 GPU 蒙皮。 |
graphicsJobMode | 选择要在支持 Native 和 Legacy 图形作业的平台上使用的图形作业模式。 |
graphicsJobs | 启用图形作业(多线程渲染)。 |
keyaliasPass | 用于为 Android 应用程序签名的密钥的密码。 |
keystorePass | 用于与 Android 密钥库交互的密码。 |
legacyClampBlendShapeWeights | 定义 SkinnedMeshRenderers 中的 BlendShape 权重范围是否受到钳制。 |
logObjCUncaughtExceptions | 是否记录了 ObjC 未捕获的异常? |
macRetinaSupport | 针对 macOS 启用 Retina 支持。 |
mipStripping | Enable mip stripping for all platforms. |
MTRendering | 是否启用多线程渲染? |
muteOtherAudioSources | 运行 Unity 应用程序时,停止或允许在后台播放来自其他应用程序的音频。 |
openGLRequireES31 | 指定应用程序是否需要 OpenGL ES 3.1 支持。 |
openGLRequireES31AEP | 指定应用程序是否需要 OpenGL ES 3.1 AEP 支持。 |
openGLRequireES32 | 指定应用程序是否需要 OpenGL ES 3.2 支持。 |
preserveFramebufferAlpha | 启用后,将在帧缓冲区中保存 Alpha 值以支持渲染 Android 上的原生 UI。 |
productName | 商品名称。 |
resizableWindow | 在独立平台播放器构建中使用可调节大小的窗口。 |
runInBackground | 如已启用,游戏将在失去焦点后继续运行。 |
statusBarHidden | 返回关于状态栏是否应隐藏的信息。仅 iOS 支持;在 Android 中,状态栏一直处于隐藏状态。 |
stereoRenderingPath | 有效立体渲染路径 |
stripEngineCode | 从构建中删除所有未使用的引擎代码(仅适限 IL2CPP)。 |
stripUnusedMeshComponents | 是否应从游戏构建中排除未使用的 Mesh 组件? |
suppressCommonWarnings | Suppresses common C# warnings. |
use32BitDisplayBuffer | 使用 32 位显示缓冲区。 |
useAnimatedAutorotation | 更改设备方向时,允许操作系统自动旋转屏幕。 |
useFlipModelSwapchain | 将 DXGI 翻转模型交换链用于 D3D11 |
useHDRDisplay | 将显示切换到 HDR 模式(如可用)。 |
useMacAppStoreValidation | 启用 Mac App Store 的收据验证。 |
usePlayerLog | 向日志文件写入调试信息。 |
useReferenceAssemblies | Set to true to make Unity use Roslyn reference assemblies when compiling scripts. Enabled by default. |
virtualRealitySplashScreen | 特定于虚拟现实的启动画面。 |
visibleInBackground | 在 Windows 中,如果使用全屏窗口模式,可在后台显示应用程序。 |
vulkanEnableLateAcquireNextImage | Delays acquiring the swapchain image until after the frame is rendered. |
vulkanEnablePreTransform | Applies the display rotation during rendering. |
vulkanEnableSetSRGBWrite | 在 Vulkan 渲染器中启用 Graphics.SetSRGBWrite()。 |
vulkanNumSwapchainBuffers | 设置将与 Vulkan 渲染器结合使用的交换链缓冲区的数量 |
GetAdditionalCompilerArgumentsForGroup | Gets an array of additional compiler arguments set for a specific BuildTargetGroup. |
GetAdditionalIl2CppArgs | IL2CPP 构建参数。 |
GetApiCompatibilityLevel | 获取指定 BuildTargetGroup 的 .NET API 兼容性级别。 |
GetApplicationIdentifier | 获取指定平台的应用程序标识符。 |
GetArchitecture | 获取 BuildTargetPlatformGroup 架构。 |
GetDefaultScriptingBackend | 返回用于给定平台组的默认 ScriptingImplementation。 |
GetGraphicsAPIs | 获取构建平台上使用的图形 API。 |
GetIconsForTargetGroup | 返回为指定平台分配的图标的列表。 |
GetIconSizesForTargetGroup | 返回指定平台的图标大小的列表。 |
GetIl2CppCompilerConfiguration | 获取编译为特定 BuildTargetGroup 生成的 C++ 代码时使用的编译器配置。 |
GetIncrementalIl2CppBuild | IL2CPP 平台是否使用增量构建? |
GetManagedStrippingLevel | 返回用于给定平台组的 ManagedStrippingLevel。 |
GetMobileMTRendering | 检查是否已启用移动平台的多线程渲染选项。 |
GetNormalMapEncoding | Returns the NormalMapEncoding used for the given platform group. |
GetPlatformIcons | 返回指定平台和 kind 可用的图标字段的列表。 |
GetPreloadedAssets | 返回将在播放器启动时加载的资源,并保持活动状态直到播放器终止。 |
GetScriptingBackend | 获取 BuildTargetPlatformGroup 的脚本框架。 |
GetScriptingDefineSymbolsForGroup | 为给定构建目标组获取用户指定的脚本编译符号。 |
GetShaderPrecisionModel | Gets the active shader precision model. |
GetStackTraceLogType | 获取堆栈跟踪日志记录选项。 |
GetSupportedIconKindsForPlatform | 检索指定平台支持的所有图标种类。 |
GetTemplateCustomValue | Returns a value of a custom template variable. |
GetUseDefaultGraphicsAPIs | 构建平台是否使用自动图形 API 选项? |
GetVirtualTexturingSupportEnabled | Is virtual texturing enabled. |
HasAspectRatio | 返回是否启用指定的宽高比。 |
SetAdditionalCompilerArgumentsForGroup | Sets additional compiler arguments for a BuildTargetGroup. |
SetAdditionalIl2CppArgs | IL2CPP 构建参数。 |
SetApiCompatibilityLevel | 为指定 BuildTargetGroup 设置 .NET API 兼容性级别。 |
SetApplicationIdentifier | 为指定平台设置应用程序标识符。 |
SetArchitecture | 设置 BuildTargetPlatformGroup 架构。 |
SetAspectRatio | 启用指定的宽高比。 |
SetGraphicsAPIs | 设置构建平台上使用的图形 API。 |
SetIconsForTargetGroup | 为指定平台分配图标列表。 |
SetIl2CppCompilerConfiguration | 设置编译为特定 BuildTargetGroup 生成的 C++ 代码时使用的编译器配置。 |
SetIncrementalIl2CppBuild | 设置增量构建标志。 |
SetManagedStrippingLevel | 设置指定 BuildTargetGroup 的托管代码剥离级别。 |
SetMobileMTRendering | 启用或禁用移动平台的多线程渲染选项。 |
SetNormalMapEncoding | Sets the normal map encoding for the given platform. |
SetPlatformIcons | 为指定平台和图标种类分配图标列表。 |
SetPreloadedAssets | 分配将在播放器启动时加载的资源,并保持活动状态直到播放器终止。 |
SetScriptingBackend | 设置 BuildTargetPlatformGroup 的脚本框架。 |
SetScriptingDefineSymbolsForGroup | 为给定构建目标组设置用户指定的脚本编译符号。 |
SetShaderPrecisionModel | Sets the shader precision model. |
SetStackTraceLogType | 设置堆栈跟踪日志记录选项。 注意:调用该函数将显式调用 Application.SetStackTraceLogType。 |
SetTemplateCustomValue | Sets a value of a custom template variable. |
SetUseDefaultGraphicsAPIs | 构建平台是否应使用自动图形 API 选项? |
SetVirtualTexturingSupportEnabled | Enable virtual texturing. |
GetInstanceID | 返回对象的实例 ID。 |
ToString | 返回对象的名称。 |
Destroy | 移除 GameObject、组件或资源。 |
DestroyImmediate | 立即销毁对象 /obj/。强烈建议您改用 Destroy。 |
DontDestroyOnLoad | 在加载新的 Scene 时,请勿销毁 Object。 |
FindObjectOfType | 返回第一个类型为 type 的已加载的激活对象。 |
FindObjectsOfType | Gets a list of all loaded objects of Type type. |
Instantiate | 克隆 original 对象并返回克隆对象。 |
bool | 该对象是否存在? |
operator != | 比较两个对象是否引用不同的对象。 |
operator == | 比较两个对象引用,判断它们是否引用同一个对象。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.