Player Electricity System allows for object to be snapped to socket locations when placing a device. These sockets are defined in the mesh editor, like show in the example image below for the SM_LargeBattery. This may look a little different depending on the engine version, if you do not have the Socket Manager window you can open in by clicking the Window drop down and tick on Socket Manager there.

For this guide I have added an example socket, this socket isnt included in the project, to learn how to add your own sockets continue reading this guide.

To add new sockets click the + button in the top right of the Socket Manager window, you will now be able to name the socket and change its location and rotation in the viewport. If you want to know more about adding sockets to static meshes there is a forum post below.

https://forums.unrealengine.com/t/how-do-you-add-a-socket-to-a-static-mesh/584236

Socket Names


A sockets type is determined by its name, all sockets that are being used by Player Electricity System must begin with PES_ like the socket shown in the image above. The next part of the name should be the socket type, so for example PES_ExampleSocket this means that socket is a ExampleSocket type and only objects set to snap to those sockets will use that socket. Last should just be a number as you may have multiple of the same socket type, so for example;

PES_ExampleSocket_01
PES_ExampleSocket_02
PES_ExampleSocket_03

Socket Types


To change the sockets a device can snap to while placing go to its blueprint like for example the BP_SolarPanel then select the Class Defaults and search for the Sockets category, like in the image below.

Here you can enable if the object should use sockets, if false the object will not snap to any sockets. You can also set the Allowed Sockets, so for this object it will be able to snap to ExampleSocket socket type, so for example the socket name would need to be PES_ExampleSocket_01 in a static mesh for this object to snap to it.

You can also add multiple socket type, this will allow the object to snap to multiple different sockets.

Devices also have a setting called Require Socket, If enabled the device will only be able to be placed when snapped to a socket, this means the device wont be able to be placed anyway on the terrain.

Adding Socket Types


To add new socket types that can be selected in the Allowed Sockets setting you need to go to the E_SocketType enum in the Content Browser, there you can add a new Enumerator, name it, and then save. You can now select the new socket type in the object’s Socket Types setting.

As an example of how you would name your new sockets if your new socket type was called Large Device your socket names in your meshes would be called;

PES_LargeDevice_01

PES_LargeDevice_02

PES_LargeDevice_03