Skip to content

Commit

Permalink
Add a bunch of Blueprint notes
Browse files Browse the repository at this point in the history
  • Loading branch information
ibbles committed Aug 23, 2020
1 parent aeac361 commit 454a9c0
Show file tree
Hide file tree
Showing 13 changed files with 296 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Blueprint Editor controls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
2020-08-08_14:27:59

# Blueprint Editor controls

Left-click and drag to select multiple nodes.
Right-click and drag to pan around the node graph.
Mouse wheel to zoom.
Default zoom will not go closer than 1:1. Hold Ctrl to zoom closer.

Right-click to open the context menu.
It's a context sensitive list of nodes you can add.
Contents depend on what kind of graph you are in and the current selection.
Selecting a component in the Components panel will show functions that can be called on that component.
Context filtering can be turned off with the checkbox in the top-right.
Allows adding nodes that may not work, use with caution.
The context menu is also shown when dragging off of a node pin.

Types of nodes that can be added:
- Event. Execution of a network always start at an event.
- Execution. Exection moves from one exeuction node to the next.
- Expression. Execution nodes can take inputs, which are computed with expression nodes.

Nodes are connected by left-clicking and dragging off of a node pin.
Execution pins connect to other execution pins, value pins connect to other value pins.
Connection wires are removed by holding Alt and clicking on a pin.
Connection wire ends are moved by holding Ctrl and dragging off of a connected pin.

Comment boxes are created by selecting zero or more nodes and pressing the `c` key.
Can also right-click and select Add Comment from the context menu.
53 changes: 53 additions & 0 deletions Blueprint Editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
2020-03-12_19:29:24

# Blueprint Editor

The Blueprint Editor is where we design and configure our Blueprint classes.
In the Components Panel we can view and add Components to our Blueprint.
In the Main Tool Bar we can compile and save our Blueprint, and find, settings, defaults, simulation, and play.
Class settings define class specific settings for the Blueprint.
Class default. Default properties for this Blueprint.
What's the difference between Simulation and Play?
Details Panel lists the properties that are available for the currently selected part of the Blueprint.
In the Viewport we can see the components of the Blueprint.

Construction Script customizable parameters for the Blueprint.
For example to provide parameters that are visible outside of the Blueprint Editor, for use by artists.
For example a light color or intensity.
The Construction Script is executed every time any change is made to the Blueprint, and when the game begins.

The Event Graph contains the moment to moment script this is run during gameplay.

My Blueprint panel shows graphcs, functions, macros, variables, including Components, and event dispatchers.
Event dispatchers are a way to communicate between Blueprints.

Types of nodes that can be added:
- Event. Execution of a network always start at an event.
- Execution. Exection moves from one exeuction node to the next.
- Expression. Execution nodes can take inputs, which are computed with expression nodes.

The list of `EditAnywhere` and `EditDefaultsOnly` `UPROPERTY` C++ class members can be shown in the Details Panel by clicking `Class Defaults` in the tool bar.
The `UPROPERTY` is accessed by right-clicking on the Blueprint grid and typing the name of the `UPROPERTY`.

The parent class of the current Blueprint class is shown in the top right corner of the Blueprint editor.

Variables are added by clicking the `+` next to the `Variables` label in `MyBlueprint` tab.
Variables of object type can be either:

- Object Reference
- Class Reference
- Soft Object Reference
- Soft Class Reference

Object Reference seems to be what one usually wants.
Mark the variable `Instance Editable` to make it show up in the Details Panel.

Instances of classes are created with the `Construct Object From Class` node.

Variables are used by dragging them from the My Blueprint panel into the graph.
Hold Alt or Ctrl to select get or set.

[[2020-03-09_21:54:48]] Blueprints
[[2020-03-11_21:08:39]] Blueprints and UPROPERTY
[[2020-03-09_21:43:36]] UPROPERTY
[[2020-05-08_22:13:22]] Blueprint macro
5 changes: 5 additions & 0 deletions Blueprint class.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2020-08-10_20:15:40

# Blueprint class

A Blueprint class is a class defined in a Blueprint.
10 changes: 10 additions & 0 deletions Blueprint construction script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
2020-08-08_16:47:45

# Blueprint construction script

A Blueprint construction script is a script that is run when a Blueprint instance is created and every time anything in that Blueprint (variables, variable values, components, etc) is changed in the Blueprint Editor.
It is like a constructor for the Blueprint class.
A bit like Begin Play, but the result of the script is seen in the Blueprint Editor while desning the Blueprint class.
With the help of the construction script we can setup class configuration variables, which is just Instance Editable variables that are read and acted upon in the construction script.

[[2020-08-08_16:43:21]] Class configuration variable
15 changes: 15 additions & 0 deletions Blueprint from C++ class.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
2020-03-11_18:48:51

# Blueprint from C++ class

Blueprint classes can be created as a derived class of a C++ class that has the `Blueprintable` specifier in the `UCLASS` macro.
Within the Blueprint editor we can set default values for the `UPROPERTY` C++ class members, including pointers to [[Assets]].
To create a new derived Blueprint class, find the desired C++ class in either the Content Browser or the Class Viewer, right-click, select `Create Blueprint class`.
The [[naming convention]] state that Blueprint classes should have a named starting with `BP_`.
The `UPROPERTY` members that have been marked with `EditAnywhere` or `EditDefaultsOnly` can now be

[[2020-03-09_21:54:48]] Blueprints
[[[2020-03-09_21:34:05]] UCLASS
[[2020-03-09_21:43:36]] UPROPERTY
[[2020-03-10_21:23:32]] Naming convetion
[[2020-03-11_19:00:31]] Assets
29 changes: 29 additions & 0 deletions Blueprint function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
2020-05-08_22:12:48

# Blueprint function

A function is another type of container, a container for an action.
Functions are added to a Blueprint by clicking the `+` button in the title of the Functions category of the My Blueprint panel in the Blueprint Editor.
Each Function Graph has a purple execution start node.
They function very much like an Event Node in that execution starts here and flows along the wires connected to the execution pins.


A Blueprint function is similar to a Blueprint macro.
A function does an actual call.
A function can have inputs and outputs.
They are added in the `Details` Panel in the function's tab when the function execution start node, the purple one, is selected.
Each input and output has a name and a type.
A function as an `Access Specifier`.
* Public: Any other Blueprint can call this function.
* Protected: Only the Blueprint itself and its children (subclasses?) can call the function.
* Private: Only the Bluepritn itself can call the function.
A function can be `Pure`, means that it doesn't have execution pins.
It becomes a subexpression rather than a task. Evaluated when needed rather than when triggered.
Functions are called in the Blueprint itself by dragging it from the `Functions` section of the `My Blueprint` tab.
Functions are called from other Blueprints by dragging off of a reference to an instance of the Blueprint class and selecting the function in the list.
A function cannot use time-based features such as Delay or Timeline.

Functions can be called either on `Self`, when we're in the Blueprint of the class itself, or on a reference to an instance of the Blueprint owning the function, if we have a reference to the instance, the reference has the correct type (and not that of a parent class) and the function is public.

[[2020-05-08_22:13:22]] Blueprint macro
[[2020-03-12_19:29:24]] Blueprint Editor
15 changes: 15 additions & 0 deletions Blueprint macro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
2020-05-08_22:13:22

## Blueprint macro

A Blueprint macro is similar to a Blueprint function.
A macro acts as-if the nodes in the macro had been placed into the calling Blueprint.
A macro can use time-based features such as Delay and Timeline.
A macro can be created by selecting a bunch of Blueprint nodes, right-click, select `Collaps to Macro`.
A macro can have inputs, each with a name and a type.
The output exec pin can be named `then` to signal that it's the default output exec pin.

Macros can be used for Blueprint execution initialization, for example to set local variables from casts.
By creating the macro in one Blueprint we can copy the macro node to a new Blueprint, double-click to open, right-click each Set variable and select Create Local Variable to create the variables in the new Blueprint as well.

[[2020-05-08_22:12:48]] Blueprint function
24 changes: 24 additions & 0 deletions Blueprint script editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
2020-07-02_15:48:19

# Blueprint script editor

The Blueprint script editor is where game logic is created using a network of nodes.
Each node is either an execution node or an expression node.
Execution nodes have the white arrow execution pins.
Execution flows from the left to the right through the nodes along the wires.
Execution starts at an Event Node, colored in red.
Computation of expressions are performed on demand.
When an execution node has an input pin connected to an expression node, then that node is evaluated.
If the expression node has input pins of its own, then those expression nodes are evaluated as well.
An expression node is evalutated, i.e., executed, every time its value is requested.

Create new nodes along an execution path by dragging off of an execution pin and select a function from the list that appars.

Wire enpoints can be moved by holding control and dragin off of a connected pin.
New nodes are created either by right-click on the background, or by draging off of a pin.

Move the viewport to an event node by double-clicking it in the Graphs section of the My Blueprint panel.

After pasting code between Blueprints that contains variables that the receiving Blueprint doesn't have, right-click the variable reference and select `Create variable`.

[[2020-05-08_22:13:22]] Blueprint macro
26 changes: 26 additions & 0 deletions Blueprint script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
2020-05-10_10:56:26

# Blueprint script

Also called a Visual Script or Event Graph.
Looks like a flow chart.
A way to specify/describe functionality without having to write code in text.
Fully integrated into Unreal Editor, no external editor required.
Create and connect nodes which provide functionality.
Execution goes from node to node along the connections.
Execution starts at an Event node. We call this an event pulse.
The pulse propagates through the connected nodes along the wires connecting execution pins.
Common events are BeginPlay and Tick.
Blueprint script is object-oriented, have access to many of the engine's C++ classes.
Either through composition, using Components, class inheritance, or function calls.
Many of the nodes are implemented with C++ code.
C++ classes can be inherited from by a Blueprint class.
Blueprints can be converted to C++ code.
Blueprint scripts are used in many contexts where custom behavior is required.
E.g. the Class Blueprint Event Graph, the Material editor, AI, Animation, HUD, etc.
Actor events, such as `EventTick`, input callbacks, such as `MoveForward`, the level Blueprint, material definitions, and HUD element update bindings are all implemented as a Blueprint script.

[[2020-05-08_22:12:48]] Blueprint function
[[2020-03-12_19:29:24]] Blueprint Editor
[[2020-03-12_20:16:37]] Level Blueprint
[[2020-07-02_15:48:19]] Blueprint script editor
29 changes: 29 additions & 0 deletions Blueprint variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
2020-05-08_22:26:42

# Blueprint variables

A variable is a container for data.
Number, string, arrays, etc.


Variables are created in a Blueprint by clickign the `+` next to the `Variables` section title of the `My Blueprint` panel.
Each variables has a name, a type, and a category.
A default value can be set once the variable has been given a type and the script been compiled.
The type can be either a primitive type (Boolean, Integer, Float, String, Vector, etc), a structure, or an object reference, or a class reference.
Each variable can be a single value, an array, a set, or a map.

The Instance Editable checkbox makes the variable show up in the Details Panel when an instance of the Blueprint class is selected in the Level Viewport so that a level designer can decide what the value of that variable should be for that particular instance.

The Blueprint Read Only checkbox controls whether or not it should be possible to modify the variable's value during runtime from a Blueprint script.

Enabling Expose on Spawn <continue here>

Blueprint Read Only means that Blueprints, not even Blueprints within the class itself, can change the variable's value.

Expose to Cinematics <continue here>

Setting a Category on a variable puts in in that collapsible group within the Details Panel when an instance of this Blueprint class is selected in the Level Viewport.
The categories (appear to be, verify) sorted by inheritance order with immediate members at the top and variables of more and more distance ancestors further and further below. It could also be that immediate members are at the top and inherited, regarless of from where, is placed below in some other orther.
Variables can be put into inherited categories. That will place the variable in the lower category in the Detals Panel when an instance is selected in the Level Viewport rather than moving the category up or splitting the category in two.


9 changes: 9 additions & 0 deletions BlueprintSpawnableComponent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
2020-04-03_09:37:12

# BlueprintSpawnableComponent

This metadata specifier, i.e., an attribute of the `Meta` class speficier, make the class spawnable by a Blueprint.
The class must be a subclass of `UActorComponent`.
This attribute is required in order to be able to add the component to an `Actor` using the `Add Component` button, or using the `NewObject`+`AddInstanceComponent`+`RegisterComponent` member functions.

[[2020-03-09_21:54:48]] [col] Blueprints
9 changes: 9 additions & 0 deletions Blueprints and UPROPERTY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
2020-03-11_21:08:39

# Blueprints and UPROPERTY

To access a `UPROPERTY` from the Blueprint script the `UPROPERTY` must have either the `BlueprintReadWrite` or the `BlueprintReadOnly` specifier, depending on if writing from the Blueprint is required or not.

[[2020-03-11_18:48:51]] Blueprint from C++ class
[[2020-03-09_21:43:36]] UPROPERTY
[[2020-03-09_21:54:48]] [col] Blueprints
43 changes: 43 additions & 0 deletions Blueprints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
2020-08-04_21:51:14

# Blueprints
A Blueprint is a container for content.
Different types of blueprints can hold different things.
Each Blueprint has a certain structure, which is described by the Blueprint class.
Such as Components, variables, functions, events, scripts, etc.
For example, an Actor Blueprint can contain meshes, lights, sounds, logic, event calls.
Each Blueprint class has a parent class.
A Blueprint class inherits from a parent class, OO-style.

A new Blueprint class is created by right-click in the Content Browser and select Blueprint Class.
An instance of a Blueprint is created in the level by dragging it from the Content Browser to the Level Viewport.
Multiple instances can be created from the same Blueprint.
Changing the Blueprint will change all instances.

The behaviors/logic within a Blueprint is defined by Blueprint scripts.
A Blueprint script is also called an Event Graph.

Blueprint is Event Based.
Events trigger the execution of a node network.
Nodes can trigger other Events, causing a chain of events to execute.

Blueprint uses references to access data and functionality in other Blueprints.
References can be set to none.
Beware of circular dependencies.
Beware of invalid references, causes errors.
Errors show up in the Message Log.


Blueprint scripts run in a virtual machine.
There is a performance cost with using a Blueprint over C++ code.
Much of what is done with Blueprints can also be done with C++.
There are some C++ APIs that are not yet exposed to Blueprints.




[[2020-05-10_10:56:26]] Blueprint script
[[2020-08-10_20:09:42]] Types of Blueprints
[[2020-04-03_09:42:50]] Components
[[2020-05-10_10:56:26]] Blueprint script
[[2020-08-10_20:15:40]] Blueprint class

0 comments on commit 454a9c0

Please sign in to comment.