AttachToActor:【Actor】通过【AttachToActor 函数】依附到父【Actor】;2)AttachToComponent:【Actor】...
但是在UE里面我们没有这样的方法,UE里是通过Child:AttachToActor或Child:AttachToComponent来创建父子连接的。反而是先创建了儿子,再去连接父亲。 这个非常关键,在UE中并没有见到Unity中自由的父物体子物体关系,比如主角,是一个Actor,主角的身上可能有多个ScenceComponent,也就有多个不同的Transform,对应身体的不同部位...
Add Child Actor Component 添加一个子ActorComponent Attach Component To Component 一个组件添加到另外一个组件上 Set Child Actor Class 设置子child 类 Set Skeletal Mesh Asset 设置骨骼资源 Destory Component 删除组件 Add Text Render Component 添加文字component Set Material 设置材质 Set Text 设置文字 Set X...
类命名(基础类actor、Uobject) 派生自 Actor 的类带有 A 前缀,如AController。 派生自 Object 的类...
外部线程:非TaskGraph内部创建的线程,包括GameThread、RenderThread、RHIThread、StatsThread和AudioThread。通过FTaskGraphInterface::Get().AttachToThread()函数来添加。 内部线程:TaskGraph在引擎初始化时创建的工作线程(TaskGraphThreadHP、TaskGraphThreadNP、TaskGraphThreadBP,优先级:HP > NP > BP),具体逻辑在FTas...
最近开始做 UE4 相关的需求,实现了一个模型自动化导入插件。要求在导入模型后,自动生成角色蓝图和动画蓝图,并把 Actor 放置到场景中自动播放动画。 整个过程要求一键导入,因此,需要使用代码来实现编辑器的一些操作。 这里不得不吐槽下 UE4 的文档,API 不全还难搜,以至于某些功能还得去翻看源码才知道调用了哪个接口...
1>关于蓝图类的加载记得在结尾要加 _C 就比如 FString sPath = "/Game/Blueprints/Actor/RuntimeActor/RuntimeCameraBP.RuntimeCameraBP_C"; 2>使用UE4编辑器的Copy Reference即可,除了蓝图类要加 _C 其他的资源应该都可以加载,就比如 FString sPath = "Texture2D'/Game/Blueprints/UITextures/风险挂接-选中....
void WeaponAttach1(); void WeaponDettach1(); //之类武器加载的是个Actor类型的蓝图,这种较好,方便做复合物体一起绑到角色身上 void WeaponAttach2(); void WeaponDettach2(); UStaticMesh* TUStaticMesh; }; MyCharacter.cpp #include "MyCharacter.h" ...
UParticleSystemComponent* PSC = UGameplayStatics::SpawnEmitterAtLocation(this, MyEffect, this->GetActorLocation());FName tmpBone = "pelvis";PSC->AttachTo(this->MeshComponent, tmpBone);生成粒子,并绑到模型指定骨骼上。Dsingol 融会贯通 8 // 屏幕上打印文字(只有一行,多了会覆盖):GEngine->...
// Create a visual to make it easier to see UStaticMeshComponent * SphereVisual =CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Static Mesh")); // Attach the static mesh to the root SphereVisual->SetupAttachment(RootComponent); // Get a reference to a sphere mesh ...