自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 UE4蓝图 绑定输入

在蓝图中绑定输入:在项目设定中设定绑定类型在蓝图中即可显示相关绑定3.最终效果附c++开启输入:一般情况下,Actor及其子类需要开启输入需要用到EnableInput()方法Actor.h/** * Pushes this actor on to the stack of input being handled by a PlayerController. * @param PlayerController The PlayerController whose input

2022-01-18 09:17:50 883

原创 UE4C++ 指定游戏或UI接受输入事件

在游戏过程中存在只需要UI接受输入事件的需求调用APlayerController::SetInputMode(const FInputModeDataBase& InData)来处理PlayerController.cpp/** Setup an input mode. */void APlayerController::SetInputMode(const FInputModeDataBase& InData){ UGameViewportClient* GameViewpo

2022-01-16 22:30:23 3418

原创 UE4C++ UI接受键盘/鼠标事件

UUserWidget.h把bIsFocusable 设置为true重写OnKeyDown() /** Setting this flag to true, allows this widget to accept focus when clicked, or when navigated to. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Interaction") uint8 bIsFocusable : 1; /

2022-01-16 22:07:30 1616 1

原创 UE4C++ 创建UI

UE4UI的创建

2022-01-16 21:57:54 1160

原创 UE4C++ 添加组件

构造函数与Runtime状态下组件的创建组件的绑定与在细节面板中的显示

2022-01-15 10:57:25 2488

原创 UE4C++ 组件调用射线检测

.h UFUNCTION() void StartLineTrace(); UPROPERTY() AActor* RootActor;};.cpp// Called when the game startsvoid ULineTraceComponent::BeginPlay(){ Super::BeginPlay(); // 绑定射线检测事件 if (RootActor==nullptr) { RootActor = GetAttachmentRootActor();

2021-12-15 11:42:12 1031

原创 UE4C++ Actor开启Input输入

UE4C++ Actor开启Input输入//引入UGameplayStatics的头文件,后续查找PlayerController#include "Kismet/GameplayStatics.h"// Called when the game starts or when spawnedvoid AClickTestActor::BeginPlay(){ Super::BeginPlay(); //获取PlayerController APlayerController* Playe

2021-12-14 10:08:42 1887 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除