
UE4
little_two_two
这个作者很懒,什么都没留下…
展开
-
UE4 error LNK2019: 无法解析的外部符号
问题:原因:是因为UE4对内部代码保护,没有对该类或者结构体导出,即没有在类前加XXX_API,此处缺少ENGINE_API。修改:原创 2020-12-29 11:19:03 · 3836 阅读 · 0 评论 -
【UE4蓝图】【屏幕坐标转世界坐标】
原创 2020-09-28 20:43:25 · 3144 阅读 · 1 评论 -
UE4【C++】【EditorCondition的使用】
1.枚举类型UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "WidgetConfig")EGUIDE_TYPE GuideType = EGUIDE_TYPE::OnlyOnce;UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "WidgetConfig", meta = (EditCondition = "GuideType == EGUIDE_TYPE::MultiTime原创 2020-09-14 15:46:05 · 1641 阅读 · 0 评论 -
玻璃雨滴效果
https://gumroad.com/debugart?recommended_by=library原创 2020-09-09 14:17:14 · 255 阅读 · 0 评论 -
UE4【C++/蓝图】【获取UE4当前时间毫秒】
FDateTime::Now().GetTimeOfDay().GetTotalMilliseconds()原创 2020-08-15 18:11:13 · 8045 阅读 · 0 评论 -
UE4 Sound常见类
UE4 Audio系统分析项目项目项目SoundWave常用属性:1.1. Format1.2. PlaybackSoundCueSoundClassSoundMixSoundAttenuationSoundConcurrencySoundOcculusionReverbEffectsAudioVolume 计划任务 完成任务创建一个表格一个简单的表格是这么创建的:项目Value电脑$1原创 2020-08-07 20:12:14 · 1764 阅读 · 0 评论 -
UE4【蓝图】【UE4 Texture Index】
原创 2020-07-28 23:34:30 · 390 阅读 · 0 评论 -
UE4【C++】【实现2维和3维数组】
template <typename T>class Array3D{public: Array3D(unsigned int _length, unsigned int _width, unsigned int _height, const T& defaultValue) : length(_length) , width(_width) , height(_height) { for (unsigned int x = 0; x < length;.原创 2020-07-27 15:28:56 · 2733 阅读 · 0 评论 -
UE4【C++】【UE4实现形参为Function的模板函数】
//A.cpptemplate<typename Functor>void ForEachPart(Functor functor){ for (unsigned int z = 0, zSize = Parts.getHeight(); z < zSize; ++z) { for (unsigned int y = 0, ySize = Parts.getWidth(); y < ySize; ++y) { for (unsigned int x = 0,.原创 2020-07-27 15:26:16 · 851 阅读 · 0 评论 -
UE4【C++】【屏幕空间转世界空间】
AActor* APlayerController::GetActorUnderPoint(const FVector2D& point) const{ FVector location, direction; DeprojectScreenPositionToWorld(point.X, point.Y, location, direction); FCollisionQueryParams TraceParams(FName(TEXT("")), true, this); Trac.原创 2020-07-27 14:52:19 · 1102 阅读 · 0 评论 -
UE4【蓝图】【修改蓝图属性导致UE4崩溃】
问题描述:项目一开始使用UE4.23,后来升级到UE4.24,出现修改蓝图组件属性,甚至UE4原生组件,比如灯光的Light的Channel都会导致UE4崩溃。解决办法:1.使用Reload,蓝图修改第一次不会崩溃,第二次依然会崩溃。2.设置Projecting里的EditorScene为空,重新打开UE4 Editor,目的是保证我们要修改的蓝图,没有场景对象实例依赖或引用目标蓝图,修改蓝图属性正常。3.比对UE4.25源码,发现是UE4的bug,并且已经在4.25修复,下面是diff文件原创 2020-07-16 10:55:01 · 2918 阅读 · 0 评论 -
UE4【C++】【解决VS在Debug时无法启动调试的问题】
问题如下图错误的配置,如下图正确的配置,如下图其实就是工作目录那一项,需要正确配置,如果为空或者配置不正确,就会出现图1的问题。原创 2020-07-13 22:41:48 · 3888 阅读 · 2 评论 -
UE4【蓝图材质】【如何实现灯光的光斑效果】
原创 2020-07-13 22:37:49 · 2009 阅读 · 1 评论 -
UE4【材质蓝图】【UE4快速实现序列帧动画】
其实材质特别简单,如下图原创 2020-07-13 22:36:04 · 4357 阅读 · 0 评论 -
UE4【C++】【战斗-扇形范围判断】
bool UFormulaFunctionLibrary::IsInsideSector(const FVector& Target, const FVector& TargetForward, const FVector& SectorCenter, const float SectorRadius){ FVector ActualPoint = Target - SectorCenter; FVector RightForward = TargetForward.Rot.原创 2020-07-02 20:41:04 · 1576 阅读 · 0 评论 -
UE4【C++】【C++播放蒙太奇】
UAnimMontage* ReLoadMontage = UUtilFunctionLibrary::GetAnimMontageFromAssetID(MuzzleConfig.ReLoadMontage); UAnimInstance* PistolAnim = PistolMeshRef->GetAnimInstance(); if (IsValid(PistolAnim)) { FAlphaBlend AlphaBlend; AlphaBlend.SetBlendTime(0.原创 2020-06-30 15:06:43 · 2064 阅读 · 0 评论 -
UE4【C++】【播放声音、特效、伤害、子弹、蒙太奇动作】
if (IsAmmoEmpty && !IsReloading) { //Play Empty Sound USoundBase* EmptyAmmoSound = MuzzleConfig.EmptyAmmoSound.Get(); if (!IsValid(EmptyAmmoSound)) { EmptyAmmoSound = MuzzleConfig.EmptyAmmoSound.LoadSynchronous(); } UGameplayStatic.原创 2020-06-30 15:04:23 · 2044 阅读 · 0 评论 -
UE4【C++】【路径加载Class和Spawn】
UClass* ProjectileClass = UFLUtils::LoadClassEx<UClass>("/Game/ThirdContent/MPS_V2/Game/Blueprints/Projectile_BP.Projectile_BP_C");if (IsValid(ProjectileClass)){ FTransform BoneTrans = BoneSocket->GetSocketTransform(PistolMeshRef); FQuat Q.原创 2020-06-30 15:02:16 · 887 阅读 · 2 评论 -
UE4【C++】【UEBuildTarget源码分析之PreBuild和PostBuild】
//1.UEBuildTarget.cs//初始化UEBuildTargetprivate UEBuildTarget(TargetDescriptor InDescriptor, ReadOnlyTargetRules InRules, RulesAssembly InRulesAssembly)//2.生成PreBuild和PostBuild对应的.bat文件WriteCustomBuildStepScriptsprivate FileReference[] WriteCustomBuild.原创 2020-06-16 22:56:33 · 890 阅读 · 0 评论 -
UE4【工具】【Quixel安装】
网址:https://quixel.com/教程地址:https://help.quixel.com/hc/en-us/articles/360002127457-Installing-the-Megascans-Plugin-for-UE4-on-Windows使用UE4账号登录Quixel菜单栏找到PRODUCTS->BRIDGE 下载安装完成后打开Bridge随便找一个材质,下载如果是第一次下载,需要设置下载路径Megascans Library选择DOWNLOADSETTING原创 2020-06-04 10:23:43 · 3630 阅读 · 0 评论 -
UE4【使用PixelStreaming功能】
1.检查硬件和环境 检查操作系统和硬件-像素流送插件只能在运行Windows操作系统的电脑上编码视频,对电脑的GPU硬件还有一定要求。欲知详情,请查阅像素流送参考。 安装node.js -如果电脑上尚未安装node.js,则需要下载并安装。 打开网络端口-必须打开本地网络上的以下端口进行通信:80、888。如需修改默认端口,请查阅像素流送参考。 停止其他web服务器 -如果电脑正在运行其他Web服务器,则将其停止。 IP地址-需要知悉电脑的IP...原创 2020-05-25 21:19:15 · 4195 阅读 · 0 评论 -
UE4【打包】【Shipping输出log】
public class GameTarget : TargetRules{ public GameTarget(TargetInfo Target) : base(Target) { Type = TargetType.Game; // enable logs and debugging for Shipping builds if (Configuration == UnrealTargetConfiguration.Shipping) { BuildEnvironmen.原创 2020-05-20 11:35:18 · 5061 阅读 · 0 评论 -
UE4【C++】【C++控制相机和身体转向固定方向】
FRotator target_rotator = FRotator(0, CameraLimit.Target_Yaw, 0);FirstPersonCamera->SetWorldRotation(target_rotator);FRotator CurrentRotaiton = FirstPersonCamera->GetComponentRotation();Firs...原创 2020-04-02 00:00:19 · 896 阅读 · 0 评论 -
UE4-【问题集合】
LogWindows: Error: Assertion failed: !bCleanedUpWorld [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/World.cpp] [Line: 4092]场景流中的子场景重复包含原创 2020-03-28 18:31:51 · 3333 阅读 · 4 评论 -
UE4-【C++】【打包NonUASSET文件并加载】
使用自定义IO操作,将目标文件(txt)放在Content1.设置附加打包目录void UMyBlueprintFunctionLibrary::ExecuteTestCode(const FString &InPaksDir){ UMyBlueprintFunctionLibrary::ShowGameDir(); FString read_str; b...原创 2020-01-14 23:44:35 · 648 阅读 · 0 评论 -
UE4-【C++】【UE4异步加载】
FString sound_path = data.Sound;FSoftObjectPath path;path.SetPath(sound_path);TSoftObjectPtr<USoundCue> sound;if (path.IsValid()) sound = Cast<USoundCue>(path.ResolveObject()); T...原创 2019-11-29 11:41:44 · 964 阅读 · 0 评论 -
UE4-【蓝图】【UE4 SpineMesh使用】
1.添加SplineComponent2.蓝图构造函数动态添加SplineMeshComponent原创 2019-11-21 12:59:32 · 1461 阅读 · 0 评论 -
UE4-【C++】【UE4接入CISQLite3】
1.下载插件CISQLite32.创建UE4工程,添加Plugins目录和CISQLite3,将1下载到的插件放入Plugins/CISQLite33.工程添加uplugin.uproject添加"Plugins": [ { "Name": "CISQLite3", "Enabled": true }]UE工程目录.Build....原创 2019-10-29 15:34:46 · 507 阅读 · 0 评论 -
UE4-【C++】【UE4添加第三方Plugin error C4668警告解决】
Files (x86)\Windows Kits\10\include\10.0.17134.0\um\winioctl.h(8921): error C4668: '_WIN32_WINNT_WIN10_TH2' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' 1>C:\Program ...原创 2019-10-29 14:45:20 · 4072 阅读 · 1 评论 -
UE4-【C++/蓝图】【UE4 C++ SpawnActor创建蓝图对象】
方式一:UPROPERTY(EditAnywhere)TSubclassOf<class APickupAndRotateActor> ObjectToSpawn;FSCPSceneItemsDataStruct scene_item = SCPGAMEINSTANCE(this)->JsonStaticDataManager->SCPSceneItems-&g...原创 2019-10-29 11:03:28 · 4238 阅读 · 1 评论 -
UE4-【C++/蓝图】【UE4CDO清理流程】
举个例子,如果第一次代码设置Actor的组件A为RootComponent,然后生成了蓝图,后来发现不合理,打算用B做RootComponent,注意,设置RootComponent逻辑在构造函数(Constructor)内进行。编译能通过,再次打开蓝图场景,发现会报异常警告root component cannot be attached to other components in the s...原创 2019-10-28 15:59:04 · 1366 阅读 · 0 评论 -
UE4-【C++】【UE4 Input Action/Axis事件注册和解注册】
void AHostPlayerController::UnRegisterInput(){ int32 bind_num = InputComponent->GetNumActionBindings(); for (int i = bind_num - 1; i >= 0; --i) { FInputActionBinding bind_action = InputCo...原创 2019-10-26 11:32:37 · 2222 阅读 · 0 评论 -
UE4-【C++/蓝图】【UE4使用坑点】
1.CreateExport: Failed to load Outer for resource场景中蓝图对象使用的dll已经过期,需要清理掉Save和Binaries2.重载函数在cpp实现中,必须全部调用Super::XXX,不调用会导致异常,比如UMG的NativeTick不执行,Actor的Tick也不执行3.如果Actor的Tick要执行,需要在构造函数里调用Prim...原创 2019-10-25 21:08:47 · 1906 阅读 · 1 评论 -
UE4表格工具三部曲之二【Protocol Buffer C 源码编译】
1.下载源码protobuf-3.10.02.解压源码到工作目录3.找到解压目录下的cmake/README.md4.依次按照其步骤编译README.md步骤1.打开Native Tools Command Prompt(VS2013是VS2013 x64 本机工具命令提示,VS2017是VS 2017的 x64_x86 交叉工具命令提示符),VS2013和VS2017该...原创 2019-10-24 01:15:51 · 590 阅读 · 0 评论 -
UE4表格工具三部曲之一【环境配置】
1.工具Python2.7或者3.x2.Pycharm:Pycharm下载链接3.依赖库:setuptools:setuptools官网Protobuff:ProtoBuff官网,下载all.zipProtoc:编译ProtoBuff使用,链接xlrd(xls reader):xlrd官网Six:Six官网,下载1.9以上版本安装Python,网上找教程即可安...原创 2019-10-23 01:02:45 · 323 阅读 · 0 评论 -
UE4-【C++】【UE_LOG打印std::string类型】
std::string name = "hello world";FString HappyString(name.c_str());UE_LOG(LogTemp, Log, TEXT("=====%s"), *HappyString);原创 2019-10-23 13:14:16 · 3074 阅读 · 0 评论 -
UE4表格工具三部曲之三【ProtocolBuff序列化和反序列化】
syntax = "proto3";option optimize_for = SPEED;message TestStruct{ map<int32,string> data = 1;}#include <iostream>#include <cstdio>#include <list>#include <st...原创 2019-10-24 01:20:50 · 819 阅读 · 0 评论 -
UE4-【蓝图】【CDO产生原因及解决方案】
Member UPROPERTY vars reset to NULL after Actor Constructor callCDO:类默认对象(Class Default Object,简称CDO)当我们从一个Class生成蓝图时,蓝图调用构造函数,把UPROPERTY对象赋值为默认值。CDO现象:构造函数Create的UObject,在出了构造函数被释放掉,成了NULL。CD...原创 2019-10-18 17:11:28 · 7198 阅读 · 0 评论