Unity getting started

Source: Internet
Author: User
Unity getting started

Use unity for the simplest interaction. (Equivalent to "Hello World") It's just getting started to get the execution done.

Step 1: Use3D production softwareCreate a scenario that we need.

Here we useMax2012 (Software size: 3.09 GB).

First, SetMax length unit, Select to useMeters.

The setting procedure is customize ----> units setup ----> System Unit setup ----> select meters from the drop-down list.

Use the plane ry in Max to create a ground. The operation is very easy. The process is as follows:

ClickFlat buttonAnd then drag the left mouse button in the 3D form.

After the creation, click "modify" to change the number of workers to

Right-click the move button. In the displayed dialog box, adjust the plane to the origin of the coordinate system.

Drag a texture from the Windows Resource Manager to the plane, so we have a cement site,

Note: textures can be found in the provided resource package.

Follow the same steps to create a wall. The difference is that we useBox ry.

After the creation, click "modify" to change the number of workers to

Create the other five sides in the same way (of course, using the copy method will be faster)

Then, you can drag and drop the five walls to attach a texture. (A friend who is familiar with Max can adjust his position and direction .)

Now our scenario is almost the same. The last job in Max isExport the scenario to fbx format.

In the pop-up export settings panel, use the default options.

So far, we have finished all the work in Max. The following operations start in unity.

If you do not want to do the scenario yourself, you can use the files in the resource package to start the following work.

1. First open Unity (I use unity3.4 and the software size is 416.77 MB ).

By default, the Project Wizard form is displayed first.

Create a new project in whatever path. (You can also use the default path)


2. In Windows resource managementTexture FileDrag it to the unity project form,

ThenExported fbx FileIn the project form.

3. ClickFirstgame file icon,

Change the file scaling ratio to 1 in the right-hand viewer form, and then click applybutton in the lower part.

4. Drag firstgame to the hierarchical form.

Double-click the firstgame object in the hierarchical form to automatically adjust the angle of view to the appropriate position.

5. Create a parallel light in the hierarchy panel, and select direal Al light in the create drop-down box.

6. PutNumber of lampsAs shown in the following figure:

7. Adjust the orientation of main camera to

8. SetMouselook. CSDrag the resource manager to the project form,

Drag the project form to the main camera in the hierarchical form,

In this way, the script is mounted to the main camera object.

The script component appears in the viewer form. In the script, adjust the number of partitions

9. Press Ctrl + P to start the program. Press the W, S, A, and D keys and then use the mouse to browse the program in the scene,

It is the same as playing games.

Press Ctrl + P during game execution, and the program stops running.

10. The last step is to build a game. You only need to set the number of shards according to the operation.

After the build is complete, click the generated webpage file to execute the game in the browser.

If you click build and runbutton, the game is automatically executed after the build is complete.

(The premise is that you must install the unity webplayer browser plug-in advance or be able to ask the network when the game is running)

At this point, the simplest interaction with unity is successfully executed.

Unity getting started

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.