[教程]Unity遊戲設計與實現:南夢宮一執行緒序員的開發例項(修訂版)隨書示例工程載入步驟

水東發表於2018-05-26

為方便初學者儘快結合該書提供的示例進行學習,本文描述瞭如何用Unity匯入這些工程並實際執行

本文執行的相關環境

  • Win10專業版
  • Unity5.3.2p1

    準備工作

  • 下載Unity

    • 到Unity官方網站找到下載連結(隨著Unity官方網頁更新,後續該url可能會發生變化,請讀者自行查詢相應版本) 官方連結 enter image description here
  • 下載隨書原始碼

    • (略)

      開始匯入

  • 解壓原始碼到合適位置 enter image description here

  • 匯入Chapter0的示例
    1. 開啟Chapter0資料夾可以看到如下檔案結構,標紅線的內容正是Unity的工作區資料 enter image description here
    2. 啟動Unity,點選Open enter image description here
    3. 選擇相應工程資料夾,注意選中的資料夾下務必要有Assets目錄 enter image description here
    4. 正常情況下此時能看到如下畫面 enter image description here
    5. 點選Assets資料夾下的Scene(Unity是以“場景”為單位組織遊戲的,開發時要選擇相應的場景) enter image description here
    6. 可以看到工程中的場景,雙擊選擇一個 enter image description here
    7. 開啟場景後可以看到如下畫面,點選上方的三角形按鈕即可啟動遊戲 enter image description here
    8. 在遊戲執行時,點選螢幕方塊將跳起 enter image description here
    9. 至此,我們就成功地匯入一個示例了。
  • 載入Chapter1的示例
    1. 重新開啟Unity,在啟動屏上點選OPEN enter image description here
    2. 按下圖選擇相應的資料夾 enter image description here
    3. 選取正確的啟動場景 enter image description here enter image description here enter image description here
    4. 這樣,我們就完成了chapter1的示例載入
  • 其餘各章節的載入基本遵循同樣的流程,故不再贅述。如有不明之處,請讀者留言指出。 (完)

相關文章