官方
官方文檔
虛幻學院(英文教程,未來可能有漢化)
https://academy.unrealengine.com/
官方B站
https://space.bilibili.com/138827797/#/
C++
- 【侯捷】《C++系統工程師》課程
- 【呂鑫】【VS2015】C/C++/數據結構教程(推薦有選擇的看)http://class.qq.com/class/22124.html
- 書籍推薦
《C++ Primer Plus》或《Essential C++》或《C++ Primer》
《大話數據結構》或《C++數據結構與算法(目前第4版)》
《Effective C++》
《More Effective C++》
《Effective STL》或《STL源碼剖析》
《設計模式》、《游戲編程模式》
《C++沉思錄》
《深度探索C++對象模型》
UE4教程
基礎操作
- 【官方中文教程:4.15版本】基礎操作教程 https://www.bilibili.com/video/av11692668
藍圖編程基礎
藍圖編程簡介
- 官方文檔 http://api.unrealengine.com/CHN/Engine/Blueprints/GettingStarted/index.html
- 大神博客 https://www.cnblogs.com/ghl_carmack/p/5922131.html
藍圖的類型 注:此處的種類只說直接實現游戲邏輯的藍圖,動畫藍圖等暫不談
- 藍圖類 https://blog.csdn.net/niu2212035673/article/details/80207669
- 【獵夢虛幻研究社】 https://mp.weixin.qq.com/s/neCr4ttFIb6w9YZ45T4t3g
- 關卡藍圖 https://blog.csdn.net/niu2212035673/article/details/80204257
- 【獵夢虛幻研究社】 https://mp.weixin.qq.com/s/AAFbScqgIJKOEGFl03I2Xg
變量類型
- 官方文檔 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Variables/index.html
- 大神博客 https://blog.csdn.net/niu2212035673/article/details/80148143
注意三種字符型變量:String、Text、Name(適當研究各自的性質及與其相關的操作節點)
三個最常會用到的復雜向量:Vector、Rotation、Transform(適當研究各自的性質及與其相關的操作節點)
UE4的組件
【官方文檔】
- 藍圖中的組件 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Components/index.html
- 組建的種類 http://api.unrealengine.com/CHN/Engine/Components/index.html
【獵夢虛幻研究社】
- https://mp.weixin.qq.com/s/HkBHFGM-wr4-mMW-IKVZfg
- UE4的組件系統是學習自Unity引擎的,組件的引入讓UE4引擎擺脫了UE3時代難以控制的代碼耦合性
事件節點
- 【官方文檔】基礎事件節點 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Events/index.html
- 【官方文檔】自定義事件 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Events/Custom/index.html
事件調度器(事件分配器)
【官方文檔】事件調度器的使用
- 創建事件調度器 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/EventDispatcher/CreatingEvents/index.html
- 調用事件調度器 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/EventDispatcher/Calling/index.html
- 綁定及解除綁定事件 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/EventDispatcher/BindingAndUnbinding/index.html
- 使用示例 http://api.unrealengine.com/CHN/Engine/Blueprints/BP_HowTo/EventDispatcher/index.html
- 【大神博客】事件調度器 https://blog.csdn.net/qq_36409711/article/details/76598715 https://blog.csdn.net/qq_14930205/article/details/78636014
事件分配器
- 【官方文檔】 UE4的藍圖編程中,所有游戲邏輯的函數都需要通過事件來驅動,而自定義事件可以當做函數來驅動,同時也可以通過事件調度器進行驅動,通過事件調度器,可以讓藍圖實現的游戲邏輯更加靈活
流程控制
- 【官方文檔】 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/FlowControl/index.html
- 【大神博客】 https://blog.csdn.net/niu2212035673/article/details/80148329
- 流程控制節點,說到底也就是傳統編程語言中的選擇結構(switch-case、if-else等)和循環結構(for、while等),這些基礎的函數結構,正是實現大部分游戲邏輯的核心
藍圖的函數
- 【官方文檔】
函數簡介
http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Functions/index.html函數調用
http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Functions/FunctionCalls/index.html - 【大神博客】 https://blog.csdn.net/niu2212035673/article/details/80202145
枚舉類型
- 【蠻牛譯館】 http://www.manew.com/thread-100301-1-1.html
- 【大神博客】(包含部分關於結構體的操作) https://blog.csdn.net/niu2212035673/article/details/80155380
- 【獵夢虛幻研究社】 https://mp.weixin.qq.com/s/nhmJe9jmy8agrjfc84ABeQ
- 有關UE4Blueprint的枚舉類型網上的資料並不多,因為大多數時候枚舉類型都會被應用到AI/行為樹和C++編程中
藍圖的數組
【官方文檔】
- 數組簡介 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Arrays/index.html
- 數組操作節點 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Arrays/ArrayNodes/index.html
【大神博客】
藍圖的結構體
【官方文檔】
【大神博客】 結構體的使用(包含部分關於枚舉類型的操作)
【大神博客】結構體數組及多維數組
- 結構體及結構體數組 https://blog.csdn.net/qq_14930205/article/details/78541532
- UE4的多維數組(用結構體實現)https://blog.csdn.net/qq_14930205/article/details/78541821
【獵夢虛幻研究社】
HitResult
藍圖的容器
Map
【官方文檔】
- Map簡介 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Maps/index.html
- Map操作節點 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Maps/MapNodes/index.html
- Map使用示例 http://api.unrealengine.com/CHN/Engine/Blueprints/BP_HowTo/WorkingWithMaps/index.html
Set
【官方文檔】
- Set簡介 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Sets/index.html
- Set操作節點 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Sets/SetNodes/index.html
- Set使用示例 http://api.unrealengine.com/CHN/Engine/Blueprints/BP_HowTo/WorkingWithSets/index.html
藍圖宏
【官方文檔】
- 藍圖宏的簡述 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Macros/index.html
- 使用宏庫(可理解為全局函數庫) http://api.unrealengine.com/CHN/Engine/Blueprints/BP_HowTo/MacroLibraries/index.html
【大神博客】
Timeline(時間軸)
- 【官方文檔】 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Timelines/index.html
- Timeline是UE4引擎中非常強大且便捷的一個功能函數,它可以實現諸如開關門、視角平滑遠近縮放等功能
隨機流
- 【官方文檔】 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/RandomStreams/index.html
- 隨機這個功能很重要,幾乎所有游戲的數值計算都會涉及到隨機函數
數學表達式
- UE4引擎的藍圖編程中有很多基礎的數學表達式節點(如四則運算),且根據不同的操作變量適配有不同的節點,其中更允許開發者自定義一個數學表達式,靈活性非常強
- 【官方文檔】 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/MathNode/index.html
藍圖的面向對象
構建腳本(藍圖相對於C++的構造函數)
面向對象特性
繼承
多態
- 重寫父類函數:在MyBlueprint欄的Function組上方,有一個Override菜單,下拉並選擇要重寫的函數,派生類中重寫的函數會覆蓋基類的函數
- 調用重寫后的父類函數:右鍵重寫后的函數節點,選擇“Add call to parent function”選項
抽象
- 如果了解面向對象思想中的抽象概念,自主按照需求定制藍圖類即可
封裝
- 藍圖類中的變量的細節面板中的“Instance Editable”如果打對號(或者MyBlueprint欄中讓變量對應的眼睛睜開,即暴露藍圖變量),則當藍圖在關卡中被實例化后,可以通過實例的細節面板進行修改相應變量的值
- 藍圖類中的變量和函數在細節面板中都有Private選項,如果Private打鈎,則該變量或函數無法被藍圖類的派生類繼承
藍圖通信 注:藍圖通信可以理解為不同藍圖間的信息傳遞和共享
【官方文檔】 藍圖通信方法(沒有提GetAllActorOfClass)
【大神博客】 https://www.cnblogs.com/songiveideas/p/learnmore2.html
1、直接藍圖
- 通信(藍圖引用)最直接的方式,但只有需要通信的類都在關卡中有實例時才可以使用【官方文檔】http://api.unrealengine.com/CHN/Engine/Blueprints/BP_HowTo/DirectBlueprintComs/index.html
2、事件調度器
- 參考上方“事件節點”
3、藍圖投射(CastTo節點)
- 很常用的藍圖通信實現節點之一,正如官方文檔所說,先詢問對象“你是否是該對象的特殊版本”,然后再進行通信【官方文檔】http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/CastNodes/index.html
4、藍圖接口
- 這種實現方式相對有些復雜,但是某種程度上最不受限制,公眾號【獵夢虛幻研究社】針對藍圖接口有幾篇不錯的文章,可以看看【官方文檔】藍圖接口概述 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Types/Interface/index.html
實現藍圖接口 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/Types/Interface/UsingInterfaces/index.html
使用藍圖接口 http://api.unrealengine.com/CHN/Engine/Blueprints/BP_HowTo/Interfaces/index.html
藍圖接口遷移 http://api.unrealengine.com/CHN/Engine/Blueprints/UserGuide/BlueprintComms/InterfaceMigration/index.html
5、GetAllActorOfClass
- 這種方式並不能算是嚴格意義上的藍圖通信,其作用是通過該節點直接操作某一個類在關卡中所有的實例對象
視頻教程
B站
- 虛幻引擎官方 https://space.bilibili.com/138827797/
- 灰太狼不吃羊肉 https://space.bilibili.com/298289600/
- 陶仁賢TRX https://space.bilibili.com/22866318/
- 楊一鳴 https://space.bilibili.com/19045234/
- UE4-諶嘉誠 https://space.bilibili.com/31898841/
- 暫無名諱 https://space.bilibili.com/76555104/
- 來自程序員的暴擊 https://space.bilibili.com/128373173/