1. 程式人生 > >Unity3D 入門 遊戲開發 Unity3D portal game development

Unity3D 入門 遊戲開發 Unity3D portal game development

tor ide 編輯 場景 div files one http video

Unity3D 入門 遊戲開發

Unity3D portal game development

作者:韓夢飛沙

Author:han_meng_fei_sha

郵箱:[email protected]

E-mail: 313134555 @qq.com

視頻學習鏈接:Video learning link:

[教學視頻]深入淺出Unity3D——第一篇-何韜-CSDN學院-在線學習教程

u3d 4.6

c# 性能上 比 java腳本 好一些

C # is better than a Java script

創建項目

Create a project

技術分享

在資產目錄下 創建一個文件夾CS.用來存放 C#腳本文件

Create a folder in the asset directory. CS. To store c # script files

然後在CS目錄創建一個個C#腳本文件, TestCS

Then create c # script files, TestCS, in the CS directory

技術分享

在菜單欄選擇 編輯,選擇 首選項

Select edit in the menu bar and select preferences

首選項preferences

技術分享

這裏有 外部腳本編輯器 ,可以選擇mono開發(內置的)。

Here is an external script editor that can select mono development (build-in).

雙擊 TestCS 打開。

Double click on TestCS to open.

技術分享

如果腳本要綁定到元件上,必須繼承monoBehavior。

If the script is to bind to the component, you must inherit the monoBehavior.

可以選中 攝像機這個元件。 然後拖動TestCS這個腳本,到元件屬性界面裏。 這個腳本就綁定了元件。

You can select the camera element.Then drag the TestCS script to the component property interface.This script binds the component.

start()是在初始化的時候運行。

Start () is run when initialized.

在元件初始化的時候,會new 這個TestCS這個類。

In the initialization of the component, new this TestCS class.

在資產目錄下創建 文件夾 場景。

Create a folder scenario under the asset directory.

在菜單欄 文件,選擇 保存 場景。

In the menu bar file, select save the scene.

Unity3D 入門 遊戲開發 Unity3D portal game development