Blueprint —— 入门笔记

蓝图比C++性能较慢;

蓝图起作用需在场景中创建实例;

在Event Graph内

  • 按住右键,平移界面;
  • 滚动滚轮,缩放界面;
  • 按住左键+节点,移动节点;
  • 右击,显示节点对话框;
  • 按住左键+引脚,可拖出引线;
    • 按住alt+点击引脚,断开引线; 
    • 按住ctrl+点击引脚,重连引线; 

蓝图执行顺序

  • Construction Script
  • Event Graph
    • 只能一个事件开始,从左到右沿着白色引线执行;

多使用注释; 

不同类型的节点,用不同颜色标识;

变量类型:

  • Boolean、byte、integer、integer64、float、name、string、text、vector、rotator、transform;

append,to lower/to upper,....

ctrl,get variable

shift,set variable

public、private,其他蓝图或子蓝图内是否能使用;

expose variables in the scene

spawn actors in the scene via buleprints

  • spawn actor from class
    • expose on spawn

Array

Flow Control

  • Branch
  • Sequence
  • For Loop
  • While Loop
  • Do N,从头执行N次;
  • Do Once
  • Flip Flop
  • Gate
  • MultiGate

Events

  • when something  happens in your game;
  • multiple events can be triggled at the same time;
  • you can call and overlap events;
  • events accept time actions:delay,timeline;
  • events don't return values;
  • they appear in the event graph;
  • they don't have their own graph;

Functions

  • action that is performed;
  • they are like actions that triggers and bring results instant;
  • they don't accept time actions;
  • you can't accept custom events;
  • they have their own execution graph;

Macros

  • Macros is a collection of different actions;
  • you can re-use it in your code multiple times;
  • they don't accept time actions;
  • they don't accept custom events;
  • they accept input and output;
  • they are not seen in C++;
  • they have their own execution graph;

Collapse Graph

Enum

 switch on ...

Game Structure

Controller 只能控制一个pawn;

  • get world location
  • get world rotation
  • get world scale
  • get world transform
  • get relative location
  • get relative rotation
  • get relative scale 3D
  • get relative transform
  • spawn actor from class
  • Get All Actors of Class
  • destroy  actor
  • is valid

 

骨架mesh

trigger

Mesh Tags

  • actor has tag

set timer by event

clear timer by function name

Blueprint Communication

  • 直接在Character上,创建开门逻辑,创建变量引用BP_Door(instance editable);Auto Possess Player;快捷键E(1不起作用);
  • Cast,通过cast访问到指定的蓝图类,在获取该蓝图类的事件等执行;

 Blueprint Basic

  • sphere trace by channel
  • Blueprint Interface,声明一个函数(定义蓝图间接口的函数)的蓝图;添加了此接口的蓝图,即拥有此函数;
    • event "interfacename"
    • 可创建输入、输出,此时将转化为函数;

Event Dispatcher

Game Mode

  •  default pawn class:BP_MyCharacter

Grab Object

 

TimeLine

  

set timer by event

clear and invalidate timer by handle

set timer by function name

clear timer by function name

FPS = 1/Delta

  • stat fps
  • stat unit
  • stat game
  • t.maxfps 120

Vector

origin point 

Forward Vector:x轴

Right Vector

Up Vector

Rotate Vector

Rotation From X Vector

Find Look at Rotation

Velocity 

  • get velocity

set scalar parameter value on material

set vector parameter value on material

create dynamic material instance

set scalar parameter value

set vector parameter value

Widget 部件

参考教程

   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值