UE4 c 程式設計,最近常用的標頭檔案

2021-10-04 06:19:07 字數 2887 閱讀 3063

ue4 c++程式設計,最近常用的標頭檔案

include

相關類作用

components/boxcomponent.h

uboxcomponent盒體觸發器

components/capsulecomponent.h

ucapsulecomponent膠囊觸發器,setcapsulesize

components/staticmeshcomponent.h

ustaticmeshcomponent靜態網格體

components/skeletalmeshcomponent.h

uskeletalmeshcomponent骨架網格體

components/inputcomponent.h

uinputcomponentsetupplayerinputcomponent(uinputcomponent* playerinputcomponent)繫結使用者輸入,

playerinputcomponent->bindaction()

playerinputcomponent->bindaxis()

blueprint/userwidget.h

uuserwidgetui

engine/skeletalmeshsocket.h

uskeletalmeshsocket在骨架socket上掛物件

engine/blockin**olume.h

ablockin**olume空氣牆

timermanager.h

ftimermanagergetworldtimermanager().settimer

(設定定時器,通過lambda或者ftimerhandle控制代碼)

gameframework/charactermovementcomponent.h

upawnmovementcomponentgetmovementcomponent(get/set所有和charactermovement相關的引數)

gameframework/projectilemovementcomponent.h

uprojectilemovementcomponent飛行物運動

gameframework/playercontroller.h

aplayercontroller常用於繼承了apawn和acharacter的類,顯示滑鼠、獲得輸入、操控transform

gameframework/springarmcomponent.h

uspringarmcomponent相機懸臂

camera/cameracomponent.h

ucameracomponent設定相機

particles/particlesystemcomponent.h

uparticlesystemcomponent粒子系統元件(通常作為常駐部件)

particles/particlesystem.h

uparticlesystem粒子系統(通常作為被呼叫資源)

sound/soundcue.h

usoundcue音效資源

animation/animinstance.h

uaniminstance呼叫動畫例項

uaniminstance* animinstance = getmesh()->getaniminstance()

animinstance->montage_play(),animinstance->montage_jumptosection()

kismet/gameplaystatics.h

ugameplaystatics超多幫助方法,超實用,看不完可怕

getplayercontroller,getgameinstance,

getplayerpawn,openlevel,getplayercameramanager

kismet/kismetmathlibrary.h

ukismetmathlibrary超多數**算,

normal/vector_normalize(向量歸一化)

randompointinboundingbox(在給定盒體中隨機取點)

vector_reciprocal(向量取倒數)

kismet/kismetsystemlibrary.h

ukismetsystemlibrary除錯上的用處,繪製除錯線框

uobject/constructorhelpers.h

constructorhelpers查詢資源,fobjectfinder,fclassfinder

aicontroller.h

aaicontrollerai相關的控制類

Ue4C 程式設計 總結篇

通過前面的一系列文章,已經將遊戲的基礎組成要素已經講完了,當然,都是單機的,不涉及網路部分。通過前面的一系列文章,我想製作乙個簡單的遊戲demo也不難了吧。umg是製作遊戲介面乙個十分簡便,強大的模組,它是由封裝自slate。slate有興趣的可以看下官方文件,是純用 編寫介面的,我更喜歡視覺化的u...

Ue4C 程式設計 UMG與c (一)

開啟乙個遊戲,最先進入眼簾的便是載入頁面,然後便是ui介面,如開始遊戲等等按鈕。本文將介紹如何在ue4中將製作乙個遊戲選單項。在ue4中,有兩種方式建立ui,一種是使用slate的方式,一種便是umg,umg是slate的封裝,是乙個視覺化的ui編輯器,類似於mfc。slate則是純c 方式,本文將...

Ue4C 程式設計 AI與c (一)

前面的文章介紹了 的類怎麼寫,怎麼使我們的人物能裝備 接下來,我們將介紹ai,ai是遊戲中不可缺少的一環,比如怪物去尋找玩家,怪物去攻擊玩家,都是有決策的,而在ue4中,這種決策是有行為樹和黑板來進行制定的,黑板是為行為樹提供資料的,我們將在接下來的文中,介紹相關知識。首先讓我們做好準備工作把。首先...