简体   繁体   中英

How to merge 2D scene and 3D scene together in Unity

Hello I am currently building a game in 3D but i want to add a level in 2D, how to add a 2D scene to a 3D project.

If this is possible using c# script not with Orthographic projection on the camera.

There are few steps you have to do to make a 2D looking scene:

  1. Create a camera object
  2. Set the view to 'Ortographic'
  3. Set its transform to look at the Z axis forward/backward
  4. Use Sprite renderers:)

In Unity, 2D and 3D are just a conversion of perspective. All objects have 3D coordinate information. When Vector3 is converted to Vector2 and the view mode is changed from perspective to orthogonal, the Z-axis information is meaningless. So, it changed from 3D to 2D. Select "Editor" under "Project Settings" in "Editor", change the "Mode" of "Default Behaviour Mode" under "Editor Settings" to "3D", and then "Ctrl + N" to create a new scene, this time is 3D development mode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM