Construction Script

Executed when instances of a Blueprint are created to perform initialization actions.

Windows
MacOS
Linux
On this page

The Construction Script runs following the Components list when an instance of a Blueprint Class is created. It contains a node graph that is executed allowing the Blueprint Class 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 be used to achieve context-specific setup. For instance, a light Blueprint could determine what type of ground it is placed upon and choose the correct mesh to use from a set of meshes or a fence Blueprint could perform traces extending out in each direction to determine how long of a fence is needed to span the distance.

Only Blueprint Classes contain Construction Scripts. Level Blueprints do not have them.

The execution entry point into the Construction Script Graph is through a ConstructionScript node that is always present.

construction_script.png

Working with Graphs

The Graph is a visual representation of a particular graph of nodes as it shows all of the nodes contained in the graph as well as the connections between them. It provides editing capabilities for adding and removing nodes, arranging nodes, and creating links between nodes. Breakpoints can also be set in the Graph to aid in debugging Blueprints.

See the Graph Editor Tab for a detailed guide to working with the ConstructionScript and other Graphs within Blueprints.

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback