Basic knowledge of UE4 blueprint basics 02-node

We know that UE blueprint programming is actually by connecting various types of nodes, and the execution sequence of the program is the connection flow sequence of the nodes. Nodes are like small boards in the event graph editor. Let's understand the basics of the next node.

1. The components of a node

Any type of node consists of three parts. header, input section, output section.

01. Title

Above the node, the title of the node is displayed. The header section is colored differently depending on the type of node. So, you know which type the node belongs to when you see the color.

02. Input part

The pins shown on the left side of a node are used to accept data from other nodes. Connect with upstream nodes through these pins to get the necessary values.

03. Output section

The pins shown on the right side of the node are used to pass values ​​to other nodes. For example, pass the result value calculated by this node to the downstream node. Downstream nodes will take this value as part of their input.

It's not just the node title that has its own color, actually. The input and output pins of the node also have different colors, which are used to indicate that different types of data are received or passed.

2. Execution order of nodes

In the event graph, the execution order of nodes is: from left to right . When arranging the nodes, the first executed one is also placed on the far left, and then arranged to the right in order, which will make it easier to connect.

3. Node type

There are mainly three types: event nodes (red), execution nodes (blue), and read nodes (green).

01. Event node

The event node title part is red. When the user operates or something happens in the game scene, an event is triggered, which is similar to a signal. For example: when starting the game, when the user operates the mouse or keyboard, when some kind of conflict occurs between characters, etc.

In the event node, there must be a white pentagonal icon on the right. This flag represents the flow of execution processing. When an event occurs, the nodes connected to the pentagonal mark of the event node will be executed sequentially.

For example, the begin play event we mentioned before is an event node.

02. Execution node

The execution node title part is blue. The node in the blueprint that specifically handles business logic. There are white pentagon logos on the left and right sides. Therefore, it can take upstream and call out downstream throughout the execution flow.

For example, the print String node is the execution node.

03. Read nodes

The header part of the read node is green. In various components in the game scene, detailed settings and information are stored, and the reading node is required to read out these data. Read nodes are characterized by white pentagons that do not set the processing order. That is, you cannot connect to this node from events.

The role of the read node is to pass the necessary information to other nodes. Therefore, the right side of the node must be prepared to receive the item that reads out the value (usually displayed as Return Value). By connecting this pin with the input pins of other nodes, you can set the necessary values ​​for other nodes.

You can simply understand that reading nodes has nothing to do with the flow of execution, but with the flow of values.

For example, the node that Get Date gets the date is the read node.

The above is some basic common sense of nodes in the UE blueprint.

Guess you like

Origin blog.csdn.net/weixin_44001613/article/details/123559531