UE4
Water_tu
这个作者很懒,什么都没留下…
展开
-
ue4 代码根据某个物体生成(复制)物体
ue4 代码根据某个物体生成(复制)物体原创 2022-11-22 00:21:51 · 564 阅读 · 0 评论 -
ue5 启动就奔溃
Assertion failed: DLLHandle != nullptr [File:D:\build\++UE5\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPluginPreload\Private\PythonScriptPluginPreload.cpp] [Line: 68]原创 2022-11-21 18:43:33 · 3211 阅读 · 1 评论 -
向量点积
原创 2019-02-24 02:33:27 · 310 阅读 · 0 评论 -
UE4 用蓝图接口 群发蓝图消息
原创 2019-02-28 15:56:16 · 544 阅读 · 0 评论 -
UE4 蓝图foreachloop 出现bug
UE4 蓝图foreachloop 出现ArrayElement 都是空值改用 Reverse For EachLoop 就可以了原创 2019-02-27 14:14:35 · 1352 阅读 · 0 评论 -
UE4 常用的导航函数
导航的物体要有移动组件// Fill out your copyright notice in the Description page of Project Settings.#include "Public/AI/STrackerBot.h"#include "Components/StaticMeshComponent.h"#include "Navigati...原创 2019-05-24 16:28:25 · 1705 阅读 · 0 评论 -
UE4 射线
// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"#include "GameFramework/Actor.h"#include "SWeapon.generated.h"class USkeletal...原创 2019-05-16 13:16:44 · 429 阅读 · 0 评论 -
UE4 事件委托
(1)先在头文件上面声明一个代理,名字要以F开头//声明一个事件委托//第一个参数事件的名称(自己定义)//后面的参数是事件所需要的参数//因为有6个参数 所以添加_SixParamsDECLARE_DYNAMIC_MULTICAST_DELEGATE_SixParams(FOnHealthChangeSignature, USHeathComponent*, HealthCompon...原创 2019-05-21 16:34:50 · 1101 阅读 · 0 评论 -
UE4 特效生成函数
#include "Kismet/GameplayStatics.h"#include "Particles/ParticleSystem.h"#include "Particles/ParticleSystemComponent.h"#include "Components/SkeletalMeshComponent.h" //生成特效(1)//参数特效,附到哪个...原创 2019-05-16 16:18:50 · 1285 阅读 · 0 评论 -
UE4 Character 死亡处理
//失去对人物的控制 DetachFromControllerPendingDestroy(); //10秒人物消失 SetLifeSpan(10.0f);原创 2019-05-22 13:40:33 · 3018 阅读 · 0 评论 -
通过命令行来控制代码是否实现
static int32 DebugWeaponDrawing = 0;FAutoConsoleVariableRef CVARDebugWeaponDrawing( TEXT("Shoot.DebugWeapons"), DebugWeaponDrawing, //通过这个值来判断 TEXT("Draw Debug Lines f...原创 2019-05-17 11:59:00 · 251 阅读 · 0 评论 -
UE4 SpawnActor
UPROPERTY(EditDefaultsOnly,Category="Player") TSubclassOf<ASWeapon> StarterWeaponClass; FActorSpawnParameters SpawnParams; SpawnParams.SpawnCollisionHandlingOverride = ESpawnA...原创 2019-05-17 15:05:10 · 1532 阅读 · 0 评论 -
UE4 运行时候查看碰撞体
按键盘波浪线 ~ (数字1前面的键),然后输入show Collision原创 2019-05-13 15:00:08 · 8653 阅读 · 0 评论 -
UE4 Character 人物移动和摄像头的旋转
// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"#include "GameFramework/Character.h"#include "SCharacter.generated.h"class UC...原创 2019-05-13 15:37:06 · 2792 阅读 · 0 评论 -
UE4 相机抖动
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Weapon") TSubclassOf<UCameraShake> FireCameraShake; APawn* MyOwner= Cast<APawn>(GetOwner()); if (MyOwner) ...原创 2019-05-17 15:49:22 · 1583 阅读 · 0 评论 -
UE4 找到文件下的资源
#include "UObject/ConstructorHelpers.h"static ConstructorHelpers::FObjectFinder<UParticleSystem> ME(TEXT("'/Game/WeaponEffects/Muzzle/P_Muzzle_Large'")); MuzzleEffect = ME.Object;...原创 2019-05-17 17:33:54 · 1246 阅读 · 0 评论 -
UE4 VR 开发环境的设置
Edit ->Plugin ,启用 SteamVR 和Steam Controller Plugin 新建一个Pawn,添加Camera组件, Lock to Hmd 这个属性要勾选显示引擎内容找到VREditor -Devices, -Generic文件夹,选中GenericHMD,在组件找到对应的Mesh添加,添加2个...原创 2019-02-18 16:30:49 · 2843 阅读 · 1 评论 -
UE 经常include的头文件
#include"ConstructorHelpers.h"#include"Animation/AnimInstance.h"#include"Engine/SkeletalMesh.h"#include"Components/SceneCaptureComponent2D.h"#include"Engine/Engine.h"#include"Camera/Ca...原创 2019-02-07 17:31:28 · 960 阅读 · 0 评论 -
UE4 静态加载模型(在构造函数里加载)
#include "UObject/ConstructorHelpers.h"#include "Components/SkeletalMeshComponent.h" // Sets default valuesAMyCharacter::AMyCharacter(){ // Set this character to call Tick() every frame. ...原创 2018-10-18 10:54:02 · 1924 阅读 · 0 评论 -
UE4 默认玩家的设置
新建一个蓝图GameMode,然后在Project 里面设置DefaultGameMode和Default Pawn Class 第二种方法,在把蓝图(要继承于Pawn)拖到场景中,在属性面板找到Pawn 设置Auto Possesss属性为Player0...原创 2018-10-09 23:16:38 · 6470 阅读 · 0 评论 -
UE4 组件的隐藏和显示
Activate()Deactivate()原创 2018-10-19 11:17:02 · 9780 阅读 · 0 评论 -
UE4 控制人物的行动和旋转
// MyCharacter.h// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"#include "GameFramework/Character.h"#include "GameFramework/Sp...原创 2018-10-17 13:15:08 · 5770 阅读 · 0 评论 -
UE 启动不断奔溃
解决方法 把项目目录Binaries下的文件都删除掉就可以了原创 2018-10-20 14:56:54 · 3856 阅读 · 0 评论 -
UE4 延时调用(定时器)
//.h// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"#include "GameFramework/GameModeBase.h"#include "PersonMoveGameModeBase....原创 2018-10-20 16:33:47 · 7545 阅读 · 1 评论 -
UE4 获得GameMode
//获得当前游戏模式 //UGameplayStatics::GetGameMode(this); ACarDemoGameModeBase* CarGamemode; //转成自己定义的GameMode类 CarGamemode=Cast<ACarDemoGameModeBase>(UGameplayStatics::GetGameMode(this)); ...原创 2018-10-21 16:08:51 · 4004 阅读 · 0 评论 -
UE4 枚举的声明
enum class EGameState:short{ Ewait, EPlaying,};原创 2018-10-21 16:12:31 · 1217 阅读 · 0 评论 -
UE C++代码添加球形碰撞体
// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"#include "GameFramework/Actor.h"#include "Components/SphereComponent.h"#includ...原创 2018-11-01 13:48:54 · 1100 阅读 · 1 评论 -
UE4 C++内联函数
#pragma once#include "CoreMinimal.h"#include "GameFramework/Actor.h"#include "Components/SphereComponent.h"#include "Collecable.generated.h"UCLASS()class PACMAN_API ACollecable : public AAc...原创 2018-11-01 16:47:23 · 912 阅读 · 0 评论 -
UE4 数组遍历
TArray<AMyCharacter*> CharacterArray; for (auto Iter(CharacterArray.CreateIterator());Iter;Iter++) { }原创 2018-11-02 13:11:44 · 2474 阅读 · 0 评论 -
UE4 AIController 寻路
// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"#include "AIController.h"#include "EnemyCharacter.h"#include "EnemyAIControlle...原创 2018-11-02 13:16:07 · 3040 阅读 · 2 评论 -
UE4 代码设置AiContoller
// Sets default valuesAEnemyCharacter::AEnemyCharacter(){ // Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorT...原创 2018-11-02 13:33:07 · 391 阅读 · 0 评论 -
UE4 获取当前默认的玩家
#include "Kismet/GameplayStatics.h" UGameplayStatics::GetPlayerPawn(this,0);//0表示默认的玩家原创 2018-11-02 14:49:59 · 3682 阅读 · 1 评论 -
UE4 屏幕上显示文字
// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"#include "GameFramework/HUD.h"#include "MyHUD.generated.h"/** * */UCLASS(...原创 2018-11-02 14:57:40 · 8014 阅读 · 0 评论 -
UE4 蓝图添加显示UI到屏幕
1、 BluePrints- Open Level BluePrints2、 在Content Browser 下,建立一个 Widget BluePrint ,命名为Start Menu原创 2019-01-23 17:22:55 · 8600 阅读 · 0 评论 -
UE4 C++ 与蓝图的相互调用
C++调用蓝图 右键c++脚本创建蓝图,(创建出来的蓝图类右上方有基于哪个C++类作为父类显示)1、C++类添加UCLASS(Blueprintable ,ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) //加上Blueprintable才可以创建继续这个类的蓝图类2、右键创建基于C++脚本的蓝图类3、(要...原创 2018-10-08 01:32:14 · 24256 阅读 · 2 评论