您需要 登录 才可以下载或查看,没有账号?注册
x
Overview
概述
Blueprints are special assets that provide an intuitive, node-based interface that can be used to create new types of Actors and script level events; giving designers and gameplay programmers the tools to quickly create and iterate gameplay from within Unreal Editor without ever needing to write a line of code.
Blueprints(蓝图) 是特殊类型的资源,提供一种直观的、基于节点的界面,以用于创建新类型的Actor及关卡脚本事件;它为关卡设计师和游戏开发人员提供了一种在虚幻编辑器中快速创建及迭代游戏可玩性的工具,而且一行代码都不需要书写。
Does that mean Blueprints are a replacement for UnrealScript? Yes and no. Gameplay programming and everything that UnrealScript was used for in the past can still be handled through code using C++. At the same time, while Blueprints are not meant as a replacement for UnrealScript, they do serve many of the same purposes that UnrealScript handled, such as:
Extending classes
Storing and modifying default properties
Managing subobject (e.g. Components) instancing for classes
The expectation is that gameplay programmers will set up base classes which expose a useful set of functions and properties that Blueprints made from those base classes can use and extend upon.
The table below provides a comparison of how various aspects would be handled in UnrealScript (from Unreal Engine 3), C++, and Blueprints to help those transitioning from previous versions of the engine as well as show how native code and Blueprints compare.
UnrealScript (UE3) | Blueprints (UE4) | C++ (UE4) | .uc file | Blueprint Asset | .h/.cpp files | UClass | UBlueprintGeneratedClass | UClass | extends [ClassName] | ParentClass | : [ClassName] | Variable | Variable | UProperty() | Function | Graphs/Events | UFunction() | defaultproperties{} | Blueprint Defaults | native constructor | Default Components | Components List | native constructor |
For more high-level introductory information about Blueprints, see Introduction to Blueprints .
关于蓝图的更高级的信息请看蓝图简介。
Types of Blueprints
蓝图的类型
Blueprints can be one of several types that each have their own specific use from creating new types to scripting level events to defining interfaces or macros to be used by other Blueprints.
Class Blueprint
类蓝图
A Class Blueprint, often shortened as Blueprint, is an asset that allows content creators to easily add functionality on top of existing gameplay classes.Blueprints are created inside of Unreal Editor visually, instead of by typing code, and saved as assets in a content package.These essentially define a new class or type of Actor which can then be placed into maps as instances that behave like anyother type of Actor.
Class Blueprint(类蓝图) ,一般缩写为 Blueprint(蓝图) ,是一种允许内容创建者轻松地基于现有游戏性类添加功能的资源。蓝图 是在虚幻编辑器中可视化地创建的,不需要书写代码,会被作为类保存在内容包中。实际上,这些类蓝图定义了一种新类别或类型的Actor,这些Actor可以作为实例放置到地图中,就和其他类型的Actor的行为一样。
Data-Only Blueprint
仅包含数据的蓝图
A Data-Only Blueprint isa Class Blueprint that contains only the code (in the form of node graphs), variables, and componentsinherited from its parent. These allow those inheritedproperties to be tweaked and modified, but no new elements can be added.These are essentially a replacement for archetypes and can be used toallow designers to tweak properties or set items with variations.
Data-Only Blueprint(仅包含数据的蓝图) 是指仅包含代码(以节点图表的形式)、变量及从其 父类 继承的组件的类蓝图。仅包含数据的蓝图允许您调整及修改继承的属性,但是不能添加新元素。从本质上讲,这些蓝图是原型的替代物,设计人员可以使用它们来调整属性或者设置具有变种的项目。
Data-Only Blueprints are edited in a compact property editor, but can also be "converted" to full Blueprints by simply adding code,variables, or components using the full Blueprint Editor.
Data-Only Blueprints(仅包含数据的蓝图) 是在合并的属性编辑器中进行编辑的,但是也可以通过使用完整的 蓝图编辑器 来添加代码、变量或组件,来将其转换为完整的 蓝图 。
Level Blueprint
关卡蓝图
A Level Blueprint is a specialized type of Blueprint that acts as a level-wide global event graph.Events pertaining to the level as a whole, or specific instances of Actors within the level, areused to fire off sequences of actions in the form of function calls or flow control operations.Those familiar with Unreal Engine 3 should be very familiar with this concept as this is very similarto how Kismet worked in Unreal Engine 3.Level Blueprints provide a control mechanism for level streaming and Matinee as wellas for binding events to Actors placed within the level.
关卡蓝图 是一种特殊类型的 蓝图 ,是作用于整个关卡的全局事件图表。关卡事件或者关卡中的Actor的特定实例,用于 激活以函数调用或者流程控制操作的形式呈现的动作序列。熟悉虚幻引擎3的人应该非常熟悉这个概念,因为这和虚幻引擎3中的 Kismet的工作原理非常类似。
关卡蓝图 提供了针对关卡动态载入、 Matinee以及给放置到关卡中的Actor绑定事件的控制机制。
Blueprint Interface
蓝图接口
A Blueprint Interface is a collection of one or more functions - name only, no implementation - that can be added toother Blueprints. Any Blueprint that has the Interface added is guaranteed to have those functions. The functionsof the Interface can be given functionality in each of the Blueprints that added it. This is essentially like theconcept of an interface in general programming, which allows multiple different types of Objects to all share and be accessedthrough a common interface. Put simply, Blueprint Interfaces allow different Blueprints to share with and send data to one another.
Blueprint Interface(蓝图接口) 是一个函数或多个函数的集合,仅有函数名称,没有函数实现,该接口可以添加到其他 蓝图 中。任何具有该 接口 的 蓝图 ,都一定会具备这些函数。在每个添加了接口的蓝图中,都可以提供 接口 的这些函数的功能。从本质上讲,这和一般编程中的接口的概念一样,允许通过一个公共接口来共享及访问多种不同类型的对象。简单地讲, Blueprint Interfaces(蓝图接口) 允许不同的 Blueprints(蓝图) 间彼此共享及发送数据。
Blueprint Interfaces can be made by content creators through the editor in a similar fashion to other Blueprints, but theycome with certain limitations in that they cannot:
蓝图接口 的创建和其他蓝图类似,可以通过编辑器中的内容创建器进行创建,但它们有一些局限性,因为它们不能:
Add new variables 添加新变量
Edit graphs 编辑图表
Add Components 添加 组件
Blueprint Macro Library
蓝图宏库
A Blueprint Macro Library is a container that holds a collection of Macros or self-contained graphs that canbe placed as nodes in other Blueprints. These can be time-savers as they can store commonly used sequences of nodescomplete with inputs and outputs for both execution and data transfer.Macros are shared among all graphs that reference them, but they are auto-expanded into the graph as if they were acollapsed node during compiling. This means that Blueprint Macro Libraries do not need to be compiled, but changesto a Macro are only reflected in graphs that references that Macro when the Blueprint containing those graphs isrecompiled.
Blueprint Macro Library(蓝图宏库) 是一个存放了一组 宏 的容器,或者是可以像节点那样放置到其他 蓝图 中的自包含图表。这些蓝图宏库非常节约时间,因为它们存放了常用的节点序列、及针对执行和数据变换的输入和输出。
宏 会在所有引用它们的图表间共享,但是如果它们在编译过程中是合并的节点,那么它们会自动地展开为图表。这意味着 蓝图宏库 不需要进行编译,但是对 宏 所做的修改,仅当重新编译了包含引用该 宏 的图表的蓝图时,这些修改才会反应在图表中。
Components
组件
The Components pane allows components to be added to the Blueprint upon creation. This provides a meansof adding collision geometry via CapsuleComponents, BoxComponents, or SphereComponents,adding rendered geometry in the form of StaticMeshComponents or SkeletalMeshComponents,controlling movement using MovementComponents, etc. The components added in the
Components list canalso be assigned to instance variables providing access to them in the graphs of this or other Blueprints.
Components(组件) 面板允许组件一创建就添加到 蓝图 上。这提供了一种方法,使得可以通过 CapsuleComponents 、 BoxComponents 或 SphereComponents 来添加碰撞几何体,可以通过 StaticMeshComponents 或 SkeletalMeshComponents 的形式添加渲染几何体,通过使用 MovementComponents 控制运动等。
您还可以将添加到 Components(组件) 列表中的组件,分配给这个蓝图或其他 蓝图 中用于访问这些组件的实例变量。
Construction Script
构建脚本
The Construction Script runs following the Components list when an instance of a Class Blueprintis created. It contains a node graph that is executed allowing the Class Blueprint instance to perform initialization operations.This can be extremely powerful as actions like performing traces into the world, setting meshes and materials, and so on can beused to achieve context-specific setup. For instance, a light Blueprint could determine what type of ground it is placedupon and choose the correct mesh to use from a set of meshes or a fence Blueprint could perform traces extending out ineach direction to determine how long of a fence is needed to span the distance.
当创建 类蓝图 时, Construction Script(构造脚本) 在 Components(组件) 列表之后运行。构造脚本包含一个节点图表,执行该图表使得该 类蓝图 实例执行初始化操作。这个功能非常强大,因为像在世界中执行追踪、设置网格物体及材质等这样的动作可以用于实现情境关联的设置。比如,一个光源的 蓝图 可以决定它所放置到的地面的类型,且可以从一组网格物体中选择要使用的正确的网格物体;或者一个篱笆 蓝图 ,它可以在各个方向上进行追踪,来决定篱笆需要有多长才能跨越那个距离。
EventGraph
事件图表
The EventGraph of a Blueprint contains a node graphthat uses events and function calls to perform actions in response togameplay events associated with the Blueprint. This is used to addfunctionality that is common to all instances of a Blueprint. This iswhere interactivity and dynamic responses are setup. For example, alight Blueprint could respond to a damage event by turning off its LightComponentand changing the material used by its mesh. This would automaticallyprovide this behavior to all instances of the light Blueprint.
蓝图中的 EventGraph(事件图表) 包含一个节点图表,该图表使用事件和函数调用来执行动作, 以便对和该蓝图相关的游戏事件做出反应。 事件图表通常用于给蓝图的所有实例添加功能。 这里也是设置交互性和动态反应的地方。 比如,一个光照蓝图可以通过关闭其 LightComponent 及改变其网格物体使用的材质来对于伤害事件做出反应。 这将会自动地为该光照蓝图的所有实例提供这种行为。
Functions
函数
Functions are node graphs belonging to a particular Blueprint that can be executed, or called, from anothergraph within the Blueprint. Functions have a single entry point designated by a node with the name of the functioncontaining a single exec output pin. When the function is called from another graph, the output exec pin is activatedcausing the connected network to execute.
Functions(函数) 是属于特定 蓝图 的节点图表,该节点图表可以执行或者从 蓝图 中的另一个图表中进行调用。函数具有一个单一的入口点,由和该函数具有相同名称的一个节点指定,该节点包含了一个单一的执行输出引脚。当从另一个图表调用函数时,会激活该输出执行引脚,促使执行连接网络。
Variables
变量
Variables are properties that hold a value or reference an Object or Actor in the world. Theseproperties can be accessible internally to the Blueprint containing them, or they can be madeaccessible externally so that their values can be modified by designers working with instancesof the Blueprint placed in a level.
Variables(变量) 是存放一个值或引用世界中的一个Object或Actor的属性。这些属性可以在包含该属性的 蓝图 中进行内部访问,或者通过设置使得可以在外部进行访问,以便应用放置在关卡中的蓝图实例的设计人员可以修改它们的值。
Blueprint Modes
蓝图模式
A Blueprint's mode determines what is visible in its window.Although Level Blueprints contain only one mode, the Graph mode, ClassBlueprints contain three different modes:
蓝图的模式决定了哪一个窗口是可见的。尽管关卡蓝图只包含一个模式,图表模式,类蓝图包含三个不同的模式。
Graph Mode - Where you add and connect scripting nodes to create gameplay functionality for your level.
图表模式-为你的游戏链接节点创建游戏规则的地方。
Default Mode - Where you set the defaults for the Blueprint.
默认模式-在这将蓝图设置为默认
Components Mode - Where you add, remove, and modify the components that make up your Blueprint.
组件模式-这个模式中可以添加,移除,和修改组件来构成你的蓝图。
|