C # Game Development QuickStart 2.1 building a game scene

Source: Internet
Author: User

C # Game Development QuickStart 2.1? Building a game scenario the assumption is that you have planned what kind of game to write after you open unity. The first thing to do is to build a game scene. The game scene is what you see in the game view when the player is playing. Includes game backgrounds, game characters, sunlight, and more. All of these visual elements are collectively known as Game Objects (Gameobject) in unity. This section will begin with the construction of the game scene.



2.1.1? A new game scene is like creating a game where you need to create a new game project, and you need to build a new game scene. Simply, Unity has created a game scene by default when the developer creates a new game project, but the game scene has not yet been saved as a detailed file. To save the game scene, you can click file| Save scene Command, or press the shortcut key on your keyboard to ctrl+s. Create new, save, and save as a game scene command. 2-1 of what you see.

When you have a game item, you start creating the game. Same. With the game scene, you can now start building the game scene. The main actions for building a game scene include: adding, moving, and deleting game objects.

Tip: With Unity's new game scene, a game object named main camera will be added by default. 2-2 of what you see.


?
Figure 2-1-Create, save, save as a game scene commands??? Figure 2-2? Unity feels the game is added to the game object--main Camera

2.1.2? Join the Game object

In Unity. There are many ways to add a game object to a game scene, and the reader can first use the two methods described below to see how the process 2-3 works.

    • ? In Unity. Click gameobject| Create the other command, and then select the kind of game object you want to join.
    • ? In the hierarchy view, click Createbutton in the upper-left corner of this view to select the kind of game object you want to join from the pop-up options.

Figure 2-3 Two ways to add game objects to a game scene

Like what. This demo sample selects Cube and plane to add a cube and a flat game object to the game scene because there is no light in the scene. So it looks very dark, so I can add a directional light again. That is, straight light. The whole process down, the game scene in total there are 4 game objects, 2-4 see.

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvzgf4dwviyq==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast "/>


Figure 2-4-4 game objects in a game scene

Tip: You can add multiple game objects with the same name in a game scene. The reader assumes that this is not conducive to the resolution of the game object, you can right-click on the Game object name and select the Rename option in the popup shortcut menu. or press the shortcut key on your keyboard to F2. The way to rename the cube object and the effect 2-5 see.

Figure 2-5 Renaming a game object

This article is selected from the "C # game development high-speed entry" book

C # Game Development QuickStart 2.1 building a game scene

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.