Unity3D game development 4 create basic game scenario 1

Source: Internet
Author: User

The idea of creating a game in Unity can be simply understood as a concept. A complete game is a Project ), different levels/scenarios in the game correspond to the Scene under the project ). A game can contain several levels/scenarios, So multiple Scene can be saved under a project.

Choose File> New Project to create a New project. You can set the Project directory and select the package to be imported, for example:


Click "Create Project". unity automatically creates an empty Project with a Camera object named Main Camera. Select this Camera. In the lower-right corner of the Scene view, the Camera Preview (Camera Preview) is displayed) thumbnails, such:



Choose File> New Scene to create a New scenario. Open Scene can Open the scenario and Save Scene to Save the current scenario, for example:


In the previous article, we have introduced how to create some basic ry, how to add Component components, and how to add Component for GameObject (game object, one is to open the Component option in the menu bar after selecting GameObject, and then select the Component to be added. The other is to click Add Component in the Inspector view, select the component to be added from the drop-down list, for example:


OK. Next we will add components for game objects in a ready-made scenario.


Open GameObject-> Create Empty in the menu bar and add an Empty object to the scenario, for example:


Keep the object selected. Open Component> Mesh Filter in the menu bar and add a grid Filter Component, for example:


Click the small circle icon in the Mesh Filter component panel in the Inspector view. In the red area, Select a Mesh model in the Select Mesh dialog box that appears, for example:


The Mesh Filter Component must be used with the Mesh Renderer Component to render the Mesh model in the Scene view. Select the game object and click Add Component in the Inspector view, select the Mesh Renderer component in the Mesh class, for example:


After the mesh model of the game object is rendered, We need to specify a texture map for it, right-click the Assets panel in the Project view, and choose Create-> Material in the displayed list, create a material in the project, for example:


Then we add texture images to the materials, such:


Select a game object, click the circle icon of Element 0 in the Materials item in the Mesh Renderer component panel in the Inspector view, and select the created material, for example:


Next, we will Add a Light source Component to the game object, select the Add Component button, and select Render-> Light, such:


We can adjust the Color, Intensity, and other parameters of the light source.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~

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.