Unity-Basic-sky box, unity-sky box

Source: Internet
Author: User

Unity-Basic-sky box, unity-sky box
There are two ways to add a sky box

1: add it to the current camera. (If there are multiple cameras in the world, you can use this method to switch the camera to view different skies.)


2: add in the current scenario.

Unity has provided nine beautiful sky boxes. You can also find them online and import them.

First, import the sky resource package that comes with Unity:

Menu Bar-> Assets-> Import Package-> Skyboxes

After the import, we will see the Assets directory under the Project window. The Skyboxes directory is the nine sky boxes provided by Unity.

1. Add a sky box to the camera

First, select the Main Camera under Hierarchy.

Click Component-> Rendering-> Skybox to add a Skybox Component to the camera. The camera's attribute bar shows the Skybox attribute, and then sets the material ball of the sky box, click the small circle behind the skym Skybox attribute

The selection box of the material ball is displayed.

Return to the interface to see the effect.

2. Add a sky box to the foreground scene
On the menu bar, select Edit-> Render Setting (ensure that other files are not selected in the scenario). The Render Setting attribute is displayed on the Inspector panel.Then, click the small circle behind the Skybox Material attribute to see the selection of the sky Material ball window, select the favorite sky Material ball, and then return to the operation interface to see the effect.

The effect is as follows:

How to add a sky in unity3d?

Create a material for the sky box first, and then add it in two ways.
One is to add it to skybox in setting -- renderSetting. In this case, the sky box is displayed in this scenario.
Another method is to add a skybox component in camera, and then add the skybox.

Unity exports no sky box

Is it a self-made sky box? If you export a self-made version of android or IOS, pay attention to the shader selection. Some shader does not support the mobile phone platform. In addition, the display level of the sky box ensures that you can see it and there are lights, check whether there are any code control problems.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.