Within Blueprint, a Construction Script is an Event Graph that runs any time a property is changed on the object it is attached to – whether it's being dragged in the editor viewport or changed via a direct entry in a Details panel. Construction Scripts allow the object in question to rebuild itself based on its new location, for instance, or to change the components it contains based on user-selected options. When coding in C++ with Unreal Engine, the equivalent concept is the OnConstruction function.
Implementing a native code Construction Script
How to do it...
- Create a new Actor called OnConstructionActor based on StaticMeshActor:
- Update the header file to the following:
#pragma once
#include "CoreMinimal...