Blueprint —— 入门笔记

张开发
2026/6/30 4:46:55 15 分钟阅读
Blueprint —— 入门笔记
蓝图比C性能较慢蓝图起作用需在场景中创建实例在Event Graph内按住右键平移界面滚动滚轮缩放界面按住左键节点移动节点右击显示节点对话框按住左键引脚可拖出引线按住alt点击引脚断开引线按住ctrl点击引脚重连引线蓝图执行顺序Construction ScriptEvent Graph只能一个事件开始从左到右沿着白色引线执行多使用注释不同类型的节点用不同颜色标识变量类型Boolean、byte、integer、integer64、float、name、string、text、vector、rotator、transformappendto lower/to upper....ctrlget variableshiftset variablepublic、private其他蓝图或子蓝图内是否能使用expose variables in the scenespawn actors in the scene via buleprintsspawn actor from classexpose on spawnArrayFlow ControlBranchSequenceFor LoopWhile LoopDo N从头执行N次Do OnceFlip FlopGateMultiGateEventswhen something happens in your game;multiple events can be triggled at the same time;you can call and overlap events;events accept time actionsdelaytimelineevents dont return valuesthey appear in the event graphthey dont have their own graphFunctionsaction that is performed;they are like actions that triggers and bring results instant;they dont accept time actions;you cant accept custom events;they have their own execution graph;MacrosMacros is a collection of different actions;you can re-use it in your code multiple times;they dont accept time actions;they dont accept custom events;they accept input and output;they are not seen in C;they have their own execution graph;Collapse GraphEnumswitch on ...Game StructureController 只能控制一个pawnget world locationget world rotationget world scaleget world transformget relative locationget relative rotationget relative scale 3Dget relative transformspawn actor from classGet All Actors of Classdestroy actoris valid骨架meshtriggerMesh Tagsactor has tagset timer by eventclear timer by function nameBlueprint Communication直接在Character上创建开门逻辑创建变量引用BP_Doorinstance editableAuto Possess Player快捷键E1不起作用Cast通过cast访问到指定的蓝图类在获取该蓝图类的事件等执行Blueprint Basicsphere trace by channelBlueprint Interface声明一个函数定义蓝图间接口的函数的蓝图添加了此接口的蓝图即拥有此函数event interfacename可创建输入、输出此时将转化为函数Event DispatcherGame Modedefault pawn classBP_MyCharacterGrab ObjectTimeLineset timer by eventclear and invalidate timer by handleset timer by function nameclear timer by function nameFPS 1/Deltastat fpsstat unitstat gamet.maxfps 120Vectororigin pointForward Vectorx轴Right VectorUp VectorRotate VectorRotation From X VectorFind Look at RotationVelocityget velocityset scalar parameter value on materialset vector parameter value on materialcreate dynamic material instanceset scalar parameter valueset vector parameter valueWidget 部件参考教程

更多文章