This repo is a simple guide about how to create custom Pins in the Unreal Engine 4 editor.
This implementation has been inspired from the detailed post:
https://wiki.unrealengine.com/How_To_Create_Custom_Blueprint_Pin.
/!\ When this repository has been created, the UE wiki has been removed from the Epic staff due to security problems.
Nonetheless they gave access of an archive with all the wiki contents.
Inside you can find the same article in the following path:
WikiPages/Unreal%20Engine%20Wiki/mediawikiv2-website-prod05.ol.epicgames.net/index0275.html
It's a simple repository to show you how to:
- create new pins for nodes in the editor graph
- make it work associated to custom settings data
This project is composed of:
- a simple UE4 c++ blank project ready to build and start
- a custom plugin to give also an example of plugin management, in it you will find:
- custom pins classes
- a factory to register these pins to the editor graph
- custom structs which can be used as any UPROPERTY or UFUNCTION parameters to display our new pins in blueprint nodes
- a custom config object used to create new possibilities to our pins choices (configuration located in UE4
project settings
)
Example is located in the blueprint level, so open it:
Choices are empty for now, don't panic, some are coming soon!
You should take a look at each classes to see implementations details, but before just a quick glance of what it is composed of:
Not really interesting, just look at the "plugins"
section which import the main plugin.
Except the UE4HowtoCustomPin.Build.cs
file to see dependencies, it's not worth it. I didn't do anything in it, it's all default content created with Unreal Engine boilerplate.
All the job is done here!
You can look at the CustomPin.Build.cs
to see dependencies.
A quick preview of each classes:
Class | files | Purpose |
---|---|---|
FCustomPinModule |
CustomPin.h/.cpp | Is the class which tells to the editor how to proceed when the plugin started, it uses the factory to add our visual pin to the Editor Graph. |
FCustomPinFactory |
CustomPinFactory.h | It checks for a given pin if it's associated to our Custom Attribute. |
FSimpleNameAttribute |
SimpleNameAttribute.h | This is a simple struct we want our pin to be associated to. |
FNestedNameAttribute |
NestedNameAttribute.h | This is a struct with 2 FName properties we want our pin to be associated to. |
FMultiNestedNamesAttribute |
MultiNestedNamesAttribute.h | This is a struct with 1 FName property + 1 TArray<FName> property we want our pin to be associated to. |
UListNameConfig |
ListNameConfig.h | Thanks to this we can't create a simple project settings menu and a simple list of names data. |
UNestedNamesConfig |
NestedNamesConfig.h | Thanks to this we can't create a simple project settings menu and a list of associated names data. |
UCustomPinBPLibrary |
CustomPinBPLibrary.h/.cpp | This will create a simple functionnal node which use our CustomAttribute as function's parameter. |
SListNameFromConfigPin |
ListNameFromConfigPin.h/.cpp | This is a simple pin object composed of 1 NameComboBox to select a name from our ListNameConfig, it embeds all the behavior, user events, retrieving associated data and UI build. |
SNestedNamesFromConfigPin |
SNestedNamesFromConfigPin.h/.cpp | This is a pin object composed of 2 NameComboBoxes to select a name with an associated subname |
SMultiNestedNamesFromConfigPin |
ListNameFromConfigPin.h/.cpp | This is a pin object composed of 1 NameComboBox + Checkboxes to select a name with with associated subnames |
I hope it helps you during your Epic's journey!
If you want to improve this, add contents or keep it up to date with new Unreal version you are very welcome!
I plan to make a serie of UE4 HowTo repositories like it, so keep in touch!
😉