- Mastering Unreal Engine 4.X
- Muhammad A.Moniem
- 129字
- 2021-07-14 11:20:41
Adding the blueprint to the GameMode
Once everything is in place, all that we need now is to make sure that the GameMode
class for the game (or for this level) is going to load our Gladiator blueprint by default once the game starts.
Open the Visual Studio project again, go to the BellzGameMode
source file, and add this piece of code inside its constructor, in order to set the DefaultPawnClass
by defining which blueprint is to be used by specifying its name and path within the project.
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/Blueprints/GladiatorCharacter")); if (PlayerPawnBPClass.Class != NULL) { DefaultPawnClass = PlayerPawnBPClass.Class; }
And now, if you start an empty level with the basic elements, or even one of the free asset levels, you'll have the Gladiator fully interactive inside the level.

推薦閱讀
- Instant Node Package Manager
- Testing with JUnit
- Objective-C應用開發全程實錄
- Android開發精要
- 羅克韋爾ControlLogix系統應用技術
- 營銷數據科學:用R和Python進行預測分析的建模技術
- Learning ELK Stack
- 軟件項目管理實用教程
- Learning Data Mining with R
- Internet of Things with ESP8266
- Spring技術內幕:深入解析Spring架構與設計原理(第2版)
- 計算機應用基礎項目化教程
- UML軟件建模
- INSTANT PLC Programming with RSLogix 5000
- JavaScript Mobile Application Development