Getting Started Tutorial] [Unity3D Unity3D game object interface and introduces basic operations

1 Interface Introduction

On Windows and other graphical operating system, proficient in the use menus, icons, shortcuts, etc., will greatly enhance the work efficiency. Therefore, to know a software, competent in using them, you must first get to know the software interface.

First click on the Window menu bar - Layouts - 2by3, set the following interface, help us to understand each window.


As shown below, each region will be divided up, it becomes seven modules, describe the main features. These seven are the menu navigation menu bar, toolbar, scene view, the game view, hierarchical view, project view, monitor view.


(1) navigation menu bar

Ÿ   File - scene creation and preservation, creation and preservation projects, programs packaged and released, and so on.

Ÿ   Edit - contains some copy, paste, delete, search and other basic editing operations, also includes software preferences (Preferences) and project settings (Project Settings), and so on. One of the most common preference should be set up. Open the Preferences - External Tools, see the following view. External Script Editor can be set to your favorite editor (for example, I put a built-in MonoDevelop changed to a VisualStudio 2013). If you need a publisher to Android phone, then you need to install the module, you can see the figures have Android settings. Since I have JDK and Android SDK installed, so only need to set the path trying to be difficult. For beginners, this is a little complicated, interested can find "Unity3D released Android Guide" to look at. Of course, if we only use the PC release in early learning program, these settings can not ignore it, keep the default on the line.


Ÿ   Assets - create, import, export, material and other functions, under normal circumstances, Unity3D external plug-in will be done by way of import unitypackage.

Ÿ   GameObject——创建游戏对象以及一些对象属性的设置。

Ÿ   Component——为游戏对象添加各种组件等。组件可以理解为一个个的小功能,对于一个游戏对象,如果添加了某个组件,它就具备了某种属性或者功能。

Ÿ   Window——顾名思义,它是对界面的一些设置。

Ÿ   Help——可以获取一些在线的帮助。

 

(2)工具栏

工具栏可以对放置于场景中的对象进行操作,如旋转、平移、缩放等。工具栏中间是游戏运行、暂停、按帧运行按钮。工具栏右侧是账户、显示层设置、窗口布局等。

(3)场景视图

场景视图是我们所创建和操作的空间。任何游戏物体都存在于场景中。场景视图是为我们开发者提供便利所设置的,我们可以从各个角度去观看游戏对象设置是否达到预期。场景视图中有很多可以设置的选项,例如2D-3D显示切换、灯光开关等。用到的时候再讨论即可。

(4)游戏视图

游戏视图是我们最终程序运行时所显示的画面,也是直接为用户呈现的画面。在我们开发过程中,它显示的是位于最高层级的camera所拍摄到的场景。

(5)层次视图

场景中的任何对象,名称都会显示在这个区域,这里可以清楚看出各个物体之间的联系,是分立关系还是父子关系(父物体可以影响子物体的运动)。也可以方便我们索引到场景中的任何对象。

(6)项目视图

资源文件在这里保存。我们也可以直接拖拽一些外部的资源(如图片等)到该区域中。这些资源文件都是保存在本地磁盘上的。

(7)监测视图

当选中某个游戏对象时,监测视图会显示它的组件,比如Transform等。


2 游戏对象基本操作

创建工程并创建场景后,我们就可以开始游戏开发了。不论你是不是要做一款游戏,我们姑且都叫做游戏开发吧。本质都是一样的。

默认情况下,场景中已经有MainCamera和Directional Light等对象。我们现在以一个Cube为例来学习旋转、平移、缩放等基本操作。点击Hierarchy——Create——3D Object——Cube,就能创建一个立方体。

当我们在场景视图中选中立方体,按下W,场景中的立方体就会如下所示。使用鼠标拖动这些带颜色的箭头就可以控制它的位置了。


按下E,并拖动带颜色的圆环,可以控制物体旋转。


按下R,拖动带颜色的方块,可以控制缩放。


当然,在Inspector视图中还可以看到该立方体的Transform组件,设置Position、Rotation、Scale等值也可以改变立方体的位置、姿态和尺度。我们还看到立方体带有BoxCollider和MeshRenderer组件,后面都会讲到的。





发布了65 篇原创文章 · 获赞 265 · 访问量 55万+

Guess you like

Origin blog.csdn.net/zzlyw/article/details/54140067