1.4 - Custom Spotlight

An overview of the Advanced Blueprints example level, example 1.4: Customizable Spotlight



The BP_Spotlight Blueprint is an example of a Blueprint used to create a customizable Actor that can be re-used in multiple situations in the creation of a game. It combines a variety of components into one Actor that is easy to place, and uses the Construction Script to allow users to tweak a number of variables.

Components List


The Blueprint contains three Static Mesh Components: A base that attaches it to a wall, the spotlight itself, and a hinge that connects the two together. The spotlight is attached to a socket within the hinge, while the hinge is attached to a socket within the base. Sockets, which can be created and positioned in the Static Mesh Editor UI, are a quick and easy way of attaching Static Meshes together without the need to manually type in offsets and rotation values in a Blueprint.

Construction Script

Click for full size or right-click and Save As.

The Light color variable not only changes the color of the Spotlight SpotLightComponent, but is also used to change vector parameters in Material Instances applied to the Spotlight mesh and Light beam mesh StaticMeshComponents. These Material Instances are created and applied to the StaticMeshComponents in the ConstructionScript, so each instance of the Blueprint will have its own unique Dynamic Material Instances.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey