Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Unity遊戲程式設計(01) Unity簡介
Search
Wu, ShyiShiou
November 11, 2016
Programming
0
520
Unity遊戲程式設計(01) Unity簡介
介紹Unity IDE基本操作
Wu, ShyiShiou
November 11, 2016
Tweet
Share
More Decks by Wu, ShyiShiou
See All by Wu, ShyiShiou
使用Evernote雲端筆記本
sswu
0
76
mBot教學(6)光感測器應用
sswu
0
720
Unity遊戲程式設計(04) 2D移動與碰撞處理I
sswu
0
1.2k
Unity遊戲程式設計(02) 應用2D圖片物件
sswu
0
1.1k
Unity遊戲程式設計(03) 製作及應用2D動畫
sswu
0
1.3k
Other Decks in Programming
See All in Programming
HTML/CSS超絶浅い説明
yuki0329
0
210
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
240
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
7
1.5k
Amazon Bedrock Multi Agentsを試してきた
tm2
1
220
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
8
1.2k
為你自己學 Python
eddie
0
540
Spring gRPC について / About Spring gRPC
mackey0225
0
170
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
190
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
2.4k
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
29
4.8k
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
150
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
28
6.1k
Featured
See All Featured
Faster Mobile Websites
deanohume
305
30k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Writing Fast Ruby
sferik
628
61k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Producing Creativity
orderedlist
PRO
343
39k
Designing Experiences People Love
moore
139
23k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Building Adaptive Systems
keathley
39
2.4k
Rails Girls Zürich Keynote
gr2m
94
13k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
Building Your Own Lightsaber
phodgson
104
6.2k
Transcript
電子工程系應 用 電 子 組 電 腦 遊 戲 設
計 組 Unity遊戲程式設計(01) Unity簡介 吳錫修 Oct 12, 2016
shape the future Unity Technologies公司於2005年推出的⼀款功能強⼤的遊戲開發 工具 4.2版以前專為3D遊戲開發而設計,稱為Unity 3D
4.3版本起增加⼀套2D遊戲開發工具包,加入2D物理引擎,重新正 名為Unity;開發遊戲專案時可選擇2D或3D遊戲專案 關於Unity 1/2 Wu, ShyiShiou Dept. of E.E., NKUT 2
shape the future 2015年3月推出Unity 5版本 個人版 (personal):營收在10萬美元以下的用戶可免費使用
專業板 (professional):每月75美元起 關於Unity 2/2 Wu, ShyiShiou Dept. of E.E., NKUT 3
shape the future https://unity3d.com/cn/get-unity/download/archive 下載unity軟體 4 Wu, ShyiShiou Dept.
of E.E., NKUT
shape the future 範例專案 Wu, ShyiShiou Dept. of E.E., NKUT
5
shape the future Unity編輯環境 階層面板 專案面板 場景面板 屬性面板 工具列 Wu,
ShyiShiou Dept. of E.E., NKUT 6
shape the future 顯示目前場景中的所有物件,並依照物件間的階層關係排列 例如最上層物件有攝影機 (Cameras)、車子 (Car)、燈光 (Lighta)…
車子物件包括碰撞機 (Colliders)、輪轂 (WheelsHubs)… 階層面板 (Hierarchy) 1/2 Wu, ShyiShiou Dept. of E.E., NKUT 7
shape the future 將物件拖曳到另⼀物件下,物件就被群組在⼀起,最上層物件稱為 父物件,其它物件則為其子物件 ⼀個不屬於任何群組的物件,是以世界座標原點為參考點;而子物 件則是以其以父物件為座標原點
子物件會隨著父物件旋轉、移動、縮放 階層面板 (Hierarchy) 2/2 Wu, ShyiShiou Dept. of E.E., NKUT 8
shape the future 變形工具:對物件進行移動、旋轉、縮放、平面編輯 (2D物件) 旋轉軸心切換:中心點 (Center) 或支點
(Pivot) 座標切換:自身座標 (Local) 或世界座標 (Global) 撥放控制器:測試遊戲、暫停、或單步執行 工具列 1/2 變形工具 座標切換 撥放控制器 Wu, ShyiShiou Dept. of E.E., NKUT 9 旋轉軸心切換
shape the future 工具列 2/2 10 Wu, ShyiShiou Dept. of
E.E., NKUT 平移場景(Q) 旋轉物體(E) (T)針對一個平面進行移動、 旋轉及縮放,在編輯2D物 件時較常使用 移動物體(W) 縮放物體(R)
shape the future 管理專案所有資源,所有專案都會有Assets根目錄,最好建立子資 料夾分門別類管理不同資源類型,常用資源包括: 場景 (Scene)、預製物件 (Prefab)、程式腳本
(Script)、3D模型 (Model)、 圖片 (Sptite)、音效 (Audio)、動畫 (Animation)… 專案面板 (Project) Wu, ShyiShiou Dept. of E.E., NKUT 11
shape the future 場景指的就是遊戲畫面,可以在這個場景視窗中擺設遊戲物件 場景面板 (Scene) 1/2 Wu, ShyiShiou
Dept. of E.E., NKUT 12 圖示選單 2D/3D切換 場景燈光開關 天空背景關闗 音效預覽
shape the future 旋轉場景:Alt+滑鼠左鍵 拉近/拉遠場景:滑鼠滾輪或Alt+滑鼠右鍵 將物件顯示於視窗中央: A.
在Hierarchy面板,雙擊物件 B. 在場景中點選物件後,按F鍵 第⼀人稱瀏覽(旋轉)場景:滑鼠右鍵 場景面板 (Scene) 2/2 Wu, ShyiShiou Dept. of E.E., NKUT 13
shape the future 模擬遊戲進行時的畫面 (可以全畫面執行),也可以顯示遊戲的執行 效能數據 遊戲面板 (Game) Wu,
ShyiShiou Dept. of E.E., NKUT 14
shape the future 顯示目前選取物件之所有可設定的屬 性,例如物件名稱、座標、物件種 類…等 若物件已附加燈光、攝影機、碰撞器、 程式腳本等元件,也可直接從屬性視
窗中設定各項參數 屬性面板 (Inspector) Wu, ShyiShiou Dept. of E.E., NKUT 15
shape the future Unity提供多種預設的版面配置讓使用者自由選擇,也可以儲存當前 自訂義的版面配置方式 自訂版面配置 Wu, ShyiShiou Dept.
of E.E., NKUT 16
shape the future File選單New Project…命令 建立新專案 1/2 17 Wu,
ShyiShiou Dept. of E.E., NKUT
shape the future 指定專案名稱、儲存位置,以及遊戲類型 (2D或3D) Asset packages…:設定要附加到專案的套件。可以在專案開發過 程中,需要時再匯入
建立新專案 2/2 18 Wu, ShyiShiou Dept. of E.E., NKUT
shape the future File選單New Scene命令 場景就是遊戲畫面 編輯過程中記得透過快捷鍵Ctrl-S儲存場景,副檔名.unity
新增場景 19 Wu, ShyiShiou Dept. of E.E., NKUT
shape the future 點選Main Camera,Inspector面版Camera>Projection Orthographic 正交投影,物體沒有前後距離分別
Perspective 透視投影,物體有前後距離之分別 攝影機投影模式 20 Wu, ShyiShiou Dept. of E.E., NKUT Perspective Orthographic
shape the future Edit選單Preferences…命令 建議使用內建的MonoDevelop編輯器 腳本編輯器 21 Wu,
ShyiShiou Dept. of E.E., NKUT
shape the future 電子工程系應 用 電 子 組 電 腦
遊 戲 設 計 組 Unity Asset Store有非常豐富的套件,其中不乏免費資源。由Asset Store面板搜尋想要的Unity範例,例如Survival Shooter 下載官方資源 1/5 22
shape the future 電子工程系應 用 電 子 組 電 腦
遊 戲 設 計 組 點擊Download 下載官方資源 2/5 23
shape the future 電子工程系應 用 電 子 組 電 腦
遊 戲 設 計 組 登錄Unity帳號 下載官方資源 3/5 24
shape the future 電子工程系應 用 電 子 組 電 腦
遊 戲 設 計 組 等待下載並解密 已下載過的套件會儲存在c:\Users\用戶名稱\AppData\Roaming\ Unity\Asset Store-5.x目錄下 下載官方資源 4/5 25
shape the future 電子工程系應 用 電 子 組 電 腦
遊 戲 設 計 組 選取要滙入要專案的資源,再點擊Import按鈕 下載官方資源 5/5 26
shape the future 了解遊戲引擎事件程序的執行流程,才能正確安排程式腳本,調校 遊戲效能 https://docs.unity3d.com/Manual/ExecutionOrder.html 事件函式執行流程 1/3
27 Wu, ShyiShiou Dept. of E.E., NKUT
shape the future 事件函式執行流程 2/3 28 Wu, ShyiShiou Dept. of
E.E., NKUT
shape the future 事件函式執行流程 3/3 29 Wu, ShyiShiou Dept. of
E.E., NKUT
shape the future 專案內容可以封裝成Unitypackage檔,來備份專案的進度或移植到 其它電腦上使用 Assets選單Export Package…命令 匯出package
30 Wu, ShyiShiou Dept. of E.E., NKUT