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 验证。 |
enableOpenGLProfilerGPURecorders | Enable ProfilerRecorder usage to record GPU timings when rendering with OpenGL. |
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 | 商品名称。 |
resetResolutionOnWindowResize | Indicates whether to reset the application's screen resolution when the native window size changes. |
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 | 向日志文件写入调试信息。 |
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 渲染器结合使用的交换链缓冲区的数量 |
GetAdditionalCompilerArguments | Gets an array of additional compiler arguments set for a specific NamedBuildTarget. |
GetAdditionalCompilerArgumentsForGroup | BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.GetAdditionalCompilerArguments instead. |
GetAdditionalIl2CppArgs | Obtain the additional arguments passed to the IL2CPP compiler during the player build process. |
GetApiCompatibilityLevel | Gets .NET API compatibility level for specified build target. |
GetApplicationIdentifier | 获取指定平台的应用程序标识符。 |
GetArchitecture | Gets the architecture for the given build target. |
GetDefaultScriptingBackend | Returns the default ScriptingImplementation for the build target you select. |
GetGraphicsAPIs | 获取构建平台上使用的图形 API。 |
GetIcons | Returns the list of assigned icons for the specified build target. |
GetIconsForTargetGroup | BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.GetIcons instead. |
GetIconSizes | 返回指定平台的图标大小的列表。 |
GetIconSizesForTargetGroup | BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.GetIconSizes instead. |
GetIl2CppCompilerConfiguration | Gets compiler configuration used when compiling generated C++ code for the build target you specify. |
GetIncrementalIl2CppBuild | Gets the value of incremental il2cpp build option. |
GetManagedStrippingLevel | Gets the managed code stripping level set for the build target you select |
GetMobileMTRendering | 检查是否已启用移动平台的多线程渲染选项。 |
GetNormalMapEncoding | Gets the NormalMapEncoding for the build target you select. |
GetPlatformIcons | Gets the list of available icon slots for the specified build target and kind. |
GetPreloadedAssets | 返回将在播放器启动时加载的资源,并保持活动状态直到播放器终止。 |
GetScriptingBackend | Gets the scripting framework for the build target you select. |
GetScriptingDefineSymbols | Gets the user-specified symbols for script compilation for the build target you select. |
GetScriptingDefineSymbolsForGroup | BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.GetScriptingDefineSymbols instead. |
GetShaderPrecisionModel | Gets the active shader precision model. |
GetStackTraceLogType | Gets stack trace logging options. |
GetSupportedIconKinds | Retrieves all icon kinds that the specified build target supports |
GetSupportedIconKindsForPlatform | BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.GetSupportedIconKinds instead. |
GetTemplateCustomValue | Returns a value of a custom template variable. |
GetUseDefaultGraphicsAPIs | 构建平台是否使用自动图形 API 选项? |
GetVirtualTexturingSupportEnabled | Is virtual texturing enabled. |
HasAspectRatio | 返回是否启用指定的宽高比。 |
SetAdditionalCompilerArguments | Sets additional compiler arguments for a build target. |
SetAdditionalCompilerArgumentsForGroup | BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.SetAdditionalCompilerArguments instead. |
SetAdditionalIl2CppArgs | Set additional arguments passed to the IL2CPP compiler during the build process. |
SetApiCompatibilityLevel | Sets .NET API compatibility level for specified build target. |
SetApplicationIdentifier | 为指定平台设置应用程序标识符。 |
SetArchitecture | Sets the architecture for the given build target. |
SetAspectRatio | 启用指定的宽高比。 |
SetGraphicsAPIs | 设置构建平台上使用的图形 API。 |
SetIcons | Assigns a list of icons for the specified platform. |
SetIconsForTargetGroup | BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.SetIcons instead. |
SetIl2CppCompilerConfiguration | Sets compiler configuration used when compiling generated C++ code for a particular build target. |
SetIncrementalIl2CppBuild | 设置增量构建标志。 |
SetManagedStrippingLevel | Sets the managed code stripping level for specified build target. |
SetMobileMTRendering | 启用或禁用移动平台的多线程渲染选项。 |
SetNormalMapEncoding | Sets the normal map encoding for the given build target. |
SetPlatformIcons | 为指定平台和图标种类分配图标列表。 |
SetPreloadedAssets | 分配将在播放器启动时加载的资源,并保持活动状态直到播放器终止。 |
SetScriptingBackend | Sets the scripting framework for a given build target. |
SetScriptingDefineSymbols | Set user-specified symbols for script compilation for the given build target. |
SetScriptingDefineSymbolsForGroup | BuildTargetGroup is marked for deprecation in the future. Use PlayerSettings.SetScriptingDefineSymbols instead. |
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 | Gets the instance ID of the object. |
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.