UE4 开发一些记录

Construct函数里一般是创建材质,设置材质

Create Dynamic Material Instance  创建动态材质,只有这个材质才可以改参数

        SetVectorParameter Value

        SetScalerParameterValue

      Add Static Mesh Component 添加一个mesh组件

       SetStaticMesh 设置mesh文件

       SetMaterial  设置材质

      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 XScale  设置x轴拉伸

       Set YScale 设置y轴拉伸

       Set Horizontal Alignment  设置水平对齐方式

       Set  WorldSize  设置大小

       Set Text Render Color  设置渲染颜色

       Set Vertical Alignment  设置垂直对齐方式

       Set  Text Material 设置字体材质

       Set Font 设置字体

 

Skeletal Mesh

       Get All Socket Names 获取所有的骨骼节点

  Get Parent Bone  获取父骨骼节点

  Get Socket Location  获取 骨骼节点位置

 

 

GetActorRoation 获取Actor的旋转

      GetForwardVector  根据旋转获取前方

      GetRight Vector   根据旋转方向获取右边

      GetUpVector   根据旋转方向获取上方

     GetRotationXVector  获取x方向

 

其中Charactor Movement具有

      Add Movement Input 增加输入方向 ,一般得到旋转,获取旋转的前方就是正方向,右边就是右边移动

 

Pawn具有

        Add Controler Yaw Input

   Add Controler Pitch Input

        GetControler 获取PlayerControler

 

PlayerControler的方法

         Enable Input开启输入

         Disable Input 关闭输入

         GetInputMouseDelta  获取鼠标的移动delta

         GetControl Pawn  获取控制的pawn

        

Actor 的方法

        SetActorTickEnabled  开启tick

   AddLocalRotation  局部旋转增加

        AddRelativeLocation  增加局部的位置

        AddActorWorldRotation   增加世界旋转

        AddRelativeRotation   增加相对旋转

        SetActorLocation   设置Actor的位置,应该是全局位置

        GetActorLocation  获取Actor的位置

       SetRelativeTransform 设置相对的transform

        SetLifeSpan  设置Actor存活时间

        DestoryActor  删除Actor

        DestoryComponent 删除组件

        Get Owner  获取拥有者

        SetVisibility 设置显示或隐藏

        GetActorForwardVector  得到Actor的正方向

         GetActorRightVector  得到Actor的右边

         GetActorUpVector  得到Actor的上方向 

         GetWorldTransform 得到世界坐标下的Transform

         SetMobility设置transfrom移动模式

    AttachActorToActor层级添加

         GetChildComponent获得子节点组件

         GetLocalRole  获得本地的Role,看是代理还是服务器

         GetAttachedActors  获取Attacheds

         SetOwner设置拥有者

    GetAttach Parent 获取被谁Attach

         DetachFromActor 不知道干啥的

         GetComponentsByClass   获取组件

 

RenderTarget2d

       ClearRenderTarget2D 清楚画板

       DrawMaterial To render Target 向画布绘制材质

  Begin DrawCanvas to Render Target  开始绘制

  Draw Material  绘制材质

  End Draw Canvas to Render Target  结束绘制

       Capture Scene  获取游戏画面

 

UMG

     image设置

               Set Brush 设置图片

               Set Brush Tint Color  设置Brush颜色

    SetInput ModeUIOnly  设置输入只有ui

    SetInput ModeGameOnly 设置游戏模式

    SetInput Mode Game And UI  设置输入模式游戏和ui都可

    CreateWidget  创建UI

    AddToViewPort 添加到视口

    SetVisiable 设置显示和隐藏

    remove From parent 移除ui

 

CollisionBox 和CollisionSphere

     GetOverlapping Actors  获取碰撞的Actors

 GameMode方法

     ResetLevel  重置关卡

     Restart Game 重新游戏

     SetGlobal Time Dilation 设置全局场景时间流速,比如 精彩时刻

Niagara Particale

     Niagara Set Vector Array Value 设置数组信息

     Niagara Get Bool Array   获取bool数组

     Set Niagara Variable(float) 设置float浮点数参数

    Set Niagara Variable(Int32)  设置int参数

     Set Niagara Variable(Material)  设置粒子材质

     Set Niagara Variable(Vector3)  设置Vector3参数

     Set Niagara  Variable By String (Int32)  同样是设置参数,但是这个是通过string

 

Spline

  Get Spline Length  获取spline的长度

       Get Location at Distance Along Spline  根据spline的距离长度 获取spline的位置

  Get Rotation at Distance Along Spline  根据spline的距离长度 获取spline的旋转

       AddSplineComponent  添加一个spline的组件

       Set Spline Points 设置spline的点,数组

       Set Location at Spline Point  设置spline的点的位置

       Get Location and Tangent at Spline Point 获取spline某个节点位置和目标

       Get Direction at DistanceAlong Spline  获取spline距离的方向

 

Possess 控制

 GetAllActorsofClass  获取场景里所有的Acotors

 Player World Camera Shake  创建相机震动

PlayAnimation播放umg动画     

StopAllAnimation 停止umg动画       

 SpawnEmitter At Location  创建一个粒子效果

SetTimerByEvent  设置定时器 

clear and Invalidate Timer by Handle 清除计时器

Get Timer Remaining Time by Handle 获取剩余的时间

Get World Delta Seconds  获取游戏的delta time

FindLookAtRotation 观看的rotation  ,x轴朝向目标点

GetPlayerCamaraManager  获取相机管理器

GetActorLocation 获取Actor的位置

GetActorTransform 获取ActorTransform

SetTargetLocation  设置目标位置

LineTraceByChannel  射线检测

MultiLineTraceByChanel 多射线碰撞

LineTraceForObjects   射线检测

SphereTraceForObjects  球形射线?

ActorHasTag  Actor的标记

Component Has Tag  组件是否有tag

GetControlRotation  获取Controler的Rotation

GetPlayerPawn 获取控制的Pawn

 

系统自带事件

        On Take Any Damage   当受到伤害

        On Take Point Damage   点击伤害

        On  Take Radial Damage  

        On Actor Begin Overlap   开始碰撞事件,穿插

        On  Actor End Overlap     结束碰撞,穿插

        On Begin Cursor  Over  鼠标经过事件

        On  End  Cursor  End   鼠标移动开

        On  Click 鼠标点击

        On  Release 鼠标移动开

        On Input Touch Begin 触摸开始

        On Input Touch End   结束触摸

        On Input Touch  Enter  触摸

           On Input  Touch Leave  触摸离开

          On  Actor Hit   物体被击中

          On  Destory  物体删除

          On  End Play  停止

 

 Debug

  DrawDebugLine  绘制debugline

       DrawDebugBox  绘制debug方块

  DrawDebugSphere 绘制debug球

  DrawDebugCircle 绘制debug圈

 

      SetEnableWorld Rendering  设置全局渲染开关,关闭了会提高帧率

 

posted on 2023-12-11 15:32  c_dragon  阅读(91)  评论(0编辑  收藏  举报

导航