Version: 2021.2
编辑器功能
Preferences

2D 和 3D 模式设置

创建新项目时,可以指定是以 2D 模式还是 3D 模式启动 Unity Editor。但是,也可以随时在 2D 模式和 3D 模式之间切换 Editor。可以在此处阅读有关 2D 和 3D 项目之间差异的更多信息。本页面将介绍如何切换模式以及切换模式时 Editor 中究竟发生哪些变化。

在 3D 和 2D 模式之间切换

要在 2D 或 3D 模式之间更改模式,请执行以下操作:

  1. Open the Editor settings (top menu: Edit > Project Settings, then select the Editor category).
  2. Then set Default Behavior Mode to either 2D or 3D.
使用 Editor 设置中的 Default Behavior Mode 设置将项目设置为 2D 或 3D 模式
使用 Editor 设置中的 Default Behavior Mode 设置将项目设置为 2D 或 3D 模式

2D 与 3D 模式设置

2D 或 3D 模式决定了 Unity Editor 的某些设置。下面列出了这些设置。

在 2D 项目模式下:

  • Any images you import are assumed to be 2D images (Sprites) and set to Sprite mode.
  • The Sprite Packer is enabled.
  • The Scene View is set to 2D.
  • 默认游戏对象没有实时方向光。
  • 摄像机的默认位置为 0,0,–10。(在 3D 模式下为 0,1,–10。)
  • The camera is set to be Orthographic. (In 3D Mode it is Perspective.)
  • 在 Lighting 窗口中:
    • Skybox is disabled for new scenes.
    • Ambient Source is set to Color. (With the color set as a dark grey: RGB: 54, 58, 66.)
    • Realtime Global Illumination (Enlighten) is set to off.
    • Baked Global Illumination is set to off.
    • Auto-Building set to off.

在 3D 项目模式下:

  • Any images you import are NOT assumed to be 2D images (Sprites).
  • The Sprite Packer is disabled.
  • The Scene View is set to 3D.
  • 默认游戏对象有实时方向光。
  • 摄像机的默认位置为 0,1,–10。(在 2D 模式下为 0,0,–10。)
  • The camera is set to be Perspective. (In 2D Mode it is Orthographic.)
  • 在 Lighting 窗口中:
    • Skybox is the built-in default Skybox Material.
    • Ambient Source is set to Skybox.
    • Realtime Global Illumination (Enlighten) is set to on.
    • Baked Global Illumination is set to on.
    • Auto-Building is set to on.
编辑器功能
Preferences