UE4 C++常见的一些头文件合集

18 篇文章 19 订阅

B站教学链接:https://space.bilibili.com/449549424?spm_id_from=333.1007.0.0
Components/BoxComponent.h UBoxComponent 盒体触发器
Components/CapsuleComponent.h UCapsuleComponent 胶囊触发器
Components/StaticMeshComponent.h UStaticMeshComponent 静态网格体
Components/SkeletalMeshComponent.h USkeletalMeshComponent 骨架网格体
Components/InputComponent.h UInputComponent SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)绑定用户输入,
PlayerInputComponent->BindAction()
PlayerInputComponent->BindAxis()
Blueprint/UserWidget.h UUserWidget UI
Engine/SkeletalMeshSocket.h USkeletalMeshSocket 在骨架Socket上挂物件
Engine/BlockingVolume.h ABlockingVolume 空气墙
TimerManager.h FTimerManager GetWorldTimerManager().SetTimer
(设置定时器,通过Lambda或者FTimerHandle句柄)
GameFramework/CharacterMovementComponent.h UPawnMovementComponent GetMovementComponent(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 ApplyDamage,SpawnEmitterAtLocation,PlaySound2D
Kismet/KismetMathLibrary.h UKismetMathLibrary 数学运算,
Normal/Vector_Normalize(向量归一化)
RandomPointInBoundingBox(在给定盒体中随机取点)
Vector_Reciprocal(向量取倒数)
Kismet/KismetSystemLibrary.h UKismetSystemLibrary 调试上的用处,绘制调试线框
UObject/ConstructorHelpers.h ConstructorHelpers查找资源FObjectFinder,FClassFinder
AIController.h AAIController AI相关的控制类
#include"Runtime\Engine\Classes\Components\TimelineComponent.h" Timeline

#include “Widgets/Layout/SBackgroundBlur.h”//背景添加
#include “Framework/Docking/TabManager.h”//FTabManager的头文件
#include “Widgets/Docking/SDockTab.h”//SDockTab的头文件
#include “Widgets/SViewport.h”//SViewport的头文件
#include “Widgets/SWindow.h”//SWindow的头文件

#include"Runtime/UMG/Public/UMG.h"
#include"Runtime/UMG/Public/UMGStyle.h"
#include"Runtime/UMG/Public/Slate/SObjectWidget.h"
#include"Runtime/UMG/Public/Blueprint/UserWidget.h"
在模块GameTest.Build.cs中加上UMG模块
PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “HeadMountedDisplay”,“UMG” });

#include “Math/UnrealMathUtility.h” FMath的头文件
#include"Engine.h"
#include “Components/Button.h” //button
#include “Components/EditableTextBox.h”// EditableText
#include “Components/TextBlock.h”//text

include"Engine/Classes/Engine/DataTable.h" datatable文件添加
#include"Runtime/Engine/Classes/Engine/Texture2D.h" UTexture图片

#include"Runtime/Core/Public/HAL/PlatformFilemanager.h" //三个文件夹操作的头文件(读取,写入,删除,移动等)
#include"Runtime/Core/Public/Misc/FileHelper.h"
#include"Runtime/Core/Public/Misc/Paths.h"

#include “Developer/DesktopPlatform/Public/DesktopPlatformModule.h”
#include “Developer/DesktopPlatform/Public/IDesktopPlatform.h”
#include “Runtime/Core/Public/HAL/FileManagerGeneric.h”

#include “Developer/DesktopPlatform/Public/DesktopPlatformModule.h” //(平台操作打开对话窗口)
#include “Developer/DesktopPlatform/Public/IDesktopPlatform.h”

#include"IImageWrapperModule.h" //图片加载头文件模块加载 { “ImageWrapper”,}
#include"IImageWrapper.h"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞起的猪

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值