从游戏中的摄像机渲染 Game 视图。该视图代表最终发布的游戏。需要使用一个或多个摄像机来控制玩家在玩游戏时实际看到的内容。有关摄像机的更多信息,请查看摄像机组件页面。
可使用工具栏中的按钮来控制 Editor 播放模式以及查看发布的游戏的播放情况。在播放模式下,所做的任何更改都是暂时的,在退出播放模式后将会重置。Editor UI 会变暗来提醒此情况。
按钮 | 功能 | |
---|---|---|
显示屏 | 如果场景中有多个摄像机,可单击此按钮从摄像机列表中进行选择。默认情况下,此按钮设置为 Display 1。(可以在摄像机模块中的 Target Display 下拉菜单下将显示分配给摄像机。) | |
Aspect | 可选择不同值来测试游戏在具有不同宽高比的显示器上的显示效果。默认情况下,此设置为 Free Aspect。 | |
Low Resolution Aspect Ratios | 如果要模拟更旧显示屏的像素密度,请选中此框:选择宽高比后,此功能会降低 Game 视图的分辨率。Game 视图位于非 Retina 显示屏上时,此复选框始终处于启用状态。 | |
Scale 滑动条 | 向右滚动可放大并更详细地检查游戏屏幕的区域。设备分辨率高于 Game 视图窗口大小的情况下,该滚动条还可缩小视图以查看整个屏幕。在游戏停止或暂停时,也可以使用滚轮和鼠标中键来执行此操作。 | |
Maximize on Play | 单击按钮启用:进入播放模式时,使用此按钮可使 Game 视图最大化(Editor 窗口的 100%)以便进行全屏预览。 | |
Mute audio | 单击按钮启用:进入播放模式时,使用此按钮可将任何游戏内的音频静音。 | |
Stats | 单击此按钮可以切换 Statistics 覆盖层,其中包含有关游戏音频和图形的渲染统计信息。这对于在播放模式下监控游戏性能非常有用。 | |
Gizmos | 单击此按钮可切换辅助图标的可见性。要在播放模式下仅查看某些类型的辅助图标,请单击 Gizmos 一词旁边的下拉箭头,然后仅选中要查看的辅助图标类型的复选框。(请参阅以下的辅助图标选项。) |
Gizmos 菜单包含用于控制对象、图标和辅助图标的显示方式的许多选项。此菜单在 Scene 视图和 Game 视图中均可用。请参阅有关 Gizmos 菜单的文档以了解更多信息。
右键单击 Game 选项卡可以显示 Game 视图的高级选项。
__Warn if No Cameras Rendering__:此选项默认为启用状态:如果没有摄像机渲染到屏幕,会显示警告。这对于诊断意外删除或禁用摄像机等问题非常有用。除非故意不使用摄像机来渲染游戏,否则应将此选项保持启用状态。
__Clear Every Frame in Edit Mode__:此选项默认为启用状态:在游戏未播放时,会每帧清除 Game 视图。这可以防止在配置游戏时出现拖尾效果。除非在未处于播放模式时依赖于前一帧的内容,否则应将此选项保持启用状态。
2018–04–25 页面已修订
从 2018.2 版开始在 Windows 上提供了 Low Resolution Aspect Ratios Game 视图选项 NewIn20182
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.