Player Settings 是您定义将在 Unity 中构建的最终游戏各种参数的地方。其中一些值用于在您打开独立游戏时启动的 Resolution Dialog 中。
accelerometerFrequency | 加速度计更新频率。 |
actionOnDotNetUnhandledException | 设置 .NET 未处理异常的崩溃行为。 |
advancedLicense | 是否正在使用高级版本? |
allowedAutorotateToLandscapeLeft | 是否支持自动旋转到横向左侧? |
allowedAutorotateToLandscapeRight | 是否支持自动旋转到横向右侧? |
allowedAutorotateToPortrait | 是否支持自动旋转到纵向? |
allowedAutorotateToPortraitUpsideDown | 是否支持自动旋转到倒置纵向? |
allowFullscreenSwitch | 如果启用,允许用户使用特定于操作系统的键盘快捷键在全屏和窗口模式之间切换。 |
allowHDRDisplaySupport | 准备应用程序以对 HDR 显示器进行图像编码。 |
allowUnsafeCode | 允许为预定义程序集编译不安全的 C# 代码。 |
applicationIdentifier | 当前选定构建目标的应用程序标识符。 |
bakeCollisionMeshes | 在玩家构建时预先烘焙碰撞网格。 |
bundleVersion | iOS 和 Android 平台之间共享的应用程序包版本。 |
colorSpace | 设置当前项目的渲染颜色空间。 |
companyName | 您公司的名称。 |
cursorHotspot | 默认光标的点击位置,以光标图像左上角的像素为单位。 |
dedicatedServerOptimizations | 对专用服务器构建执行其他优化。 |
defaultCursor | 应用程序的默认光标。 |
defaultInterfaceOrientation | 移动设备的默认屏幕方向。 |
defaultScreenHeight | 独立播放器窗口的默认垂直尺寸。 |
defaultScreenWidth | 独立播放器窗口的默认水平尺寸。 |
defaultWebScreenHeight | Web 播放器窗口的默认垂直尺寸。 |
defaultWebScreenWidth | Web 播放器窗口的默认水平尺寸。 |
enable360StereoCapture | 在当前构建目标上启用 360 立体声捕获支持。 |
enableCrashReportAPI | 启用 CrashReport API。 |
enableFrameTimingStats | 启用帧计时统计信息。 |
enableInternalProfiler | 启用内部探查器。 |
enableMetalAPIValidation | 在编辑器中启用 Metal API 验证。 |
enableOpenGLProfilerGPURecorders | 启用 ProfilerRecorder 使用来记录使用 OpenGL 渲染时的 GPU 计时。 |
forceSingleInstance | 将独立播放器限制为单个并发运行实例。 |
fullScreenMode | 与平台无关的设置,用于定义全屏行为。并非所有平台都支持所有模式。 |
gcIncremental | 允许您启用或禁用垃圾回收的增量模式。 |
gpuSkinning | 将来会被弃用。使用 PlayerSettings.meshDeformation 代替。 |
graphicsJobMode | 选择在支持原生、传统和拆分图形作业的平台上使用的图形作业模式。 |
graphicsJobs | 启用图形作业(多线程渲染)。 |
hdrBitDepth | 交换链缓冲区中每个颜色通道的位数。 |
insecureHttpOption | 确定是否允许纯文本 HTTP 连接。 |
legacyClampBlendShapeWeights | 定义 SkinnedMeshRenderers 中的 BlendShape 权重范围是否被钳位。 |
logObjCUncaughtExceptions | 是否记录 ObjC 未捕获的异常? |
macRetinaSupport | 为 macOS 启用 Retina 支持。 |
meshDeformation | 指定 Unity 用于处理蒙皮的网格变形的方法。 |
mipStripping | 为所有平台启用 mip 剥离。 |
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 | 指示当原生窗口大小发生变化时是否重置应用程序的屏幕分辨率。 |
resizableWindow | 在独立播放器构建中使用可调整大小的窗口。 |
runInBackground | 如果启用,您的游戏将在失去焦点后继续运行。 |
spriteBatchVertexThreshold | 指定 Sprite 批处理的最大顶点限制。 |
statusBarHidden | 返回是否应隐藏状态栏。仅在 iOS 上受支持;在 Android 上,状态栏始终隐藏。 |
stereoRenderingPath | 活动立体渲染路径 |
strictShaderVariantMatching | 在播放器中启用严格的着色器变体匹配。 |
stripEngineCode | 从您的构建中删除未使用的引擎代码(仅限 IL2CPP)。 |
stripUnusedMeshComponents | 是否应将未使用的网格组件排除在游戏构建之外? |
suppressCommonWarnings | 禁止常见的 C# 警告。 |
tvOSBundleVersion | TVOS 平台的应用程序包版本。 |
use32BitDisplayBuffer | 使用 32 位显示缓冲区。 |
useAnimatedAutorotation | 让操作系统在设备方向发生变化时自动旋转屏幕。 |
useFlipModelSwapchain | 对 D3D11 使用 DXGI 翻转模型交换链。 |
useHDRDisplay | 将主显示器切换到 HDR 模式(如果可用)。 |
useMacAppStoreValidation | 为 Mac App Store 启用收据验证。 |
usePlayerLog | 使用调试信息写入日志文件。 |
virtualRealitySplashScreen | 虚拟现实特定的启动画面。 |
visibleInBackground | 在 Windows 上,如果使用全屏窗口模式,则在后台显示应用程序。 |
visionOSBundleVersion | VisionOS 平台的应用程序包版本。 |
vulkanEnableLateAcquireNextImage | 延迟获取交换链图像,直到渲染完帧后。 |
vulkanEnablePreTransform | 在渲染期间应用显示旋转。 |
vulkanEnableSetSRGBWrite | 在 Vulkan 渲染器上启用 Graphics.SetSRGBWrite()。 |
vulkanNumSwapchainBuffers | 设置要与 Vulkan 渲染器一起使用的交换链缓冲区数量 |
windowsGamepadBackendHint | 指定要用于输入的所需 Windows API。 |
GetInstanceID | 获取对象的实例 ID。 |
ToString | 返回对象的名称。 |
Destroy | 删除游戏对象、组件或资产。 |
DestroyImmediate | 立即销毁对象 obj。强烈建议您使用 Destroy 代替。 |
DontDestroyOnLoad | 加载新场景时不要销毁目标对象。 |
FindAnyObjectByType | 检索任何类型为 type 的活动加载对象。 |
FindFirstObjectByType | 检索类型为 type 的第一个活动加载对象。 |
FindObjectsByType | 检索类型为 type 的所有加载对象的列表。 |
Instantiate | 克隆对象 original 并返回克隆。 |
InstantiateAsync | 捕获原始对象(必须与某些游戏对象相关)的快照,并返回 AsyncInstantiateOperation。 |
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.