SGraphPinStructInstance

Example implementation:

Unreal Engine C++ API Reference > Editor > GraphEditor > KismetPins

Inheritance Hierarchy

References

   
Module GraphEditor
Header /Engine/Source/Editor/GraphEditor/Public/KismetPins/SGraphPinStructInstance.h
Include #include "KismetPins/SGraphPinStructInstance.h"

Syntax

class SGraphPinStructInstance : public [SGraphPin](API\Editor\GraphEditor\SGraphPin)  

Remarks

Example implementation:

struct FDataTypeEditWrapper : public FPinStructEditWrapper {

FDataType Data;

virtual FText GetPreviewDescription() const override { return Data.ToText(); } virtual const UScriptStruct* GetDataScriptStruct() const override { return FDataType::StaticStruct(); } virtual uint8* GetDataMemory() override { return (uint8*)&Data; } }; This is a pin for showing a details customization for a struct instance. It can be used directly by passing in a StructEditWrapper parameter when creating from a pin factory Or, it can be subclassed for other types of struct display

Variables

Type Name Description
FText CachedDescription Cached description text
TSharedPtr< SCo... ComboButton Combo Button widget used to show edit content
TSharedPtr< FSt... EditWrapperInstance Instance of FPinStructEditWrapper that wraps what we actually want to edit
TSharedPtr< ISt... StructureDetailsView Details view that points into EditWrapperInstance

Functions

Type Name Description
void Construct ( const FArguments& InArgs, UEdGraphPin* InGraphPinObj )  
FText GetCachedDescriptionText () Slate accessor to shows cached description value
TSharedRef< ... GetDescriptionContent () Creates widget for displaying preview on the pin
TSharedRef< ... GetEditContent () Creates widget used to edit the struct instance
FPinStructEd... GetEditWrapper () Returns the base instance inside EditStruct, if null this is assumed to be a subclass that overrides other functions
void ParseDefaultValueData () Parses the struct ata from the pin to fill in the struct instance
void PropertyValueChanged ( const FPropertyChangedEvent& Prope... ) Called when struct is modified by the details view
void RefreshCachedData () Refreshes cached description and edit data after an edit change
void SaveDefaultValueData () Call to push changes from edit instance to pin

Overridden from SGraphPin

Type Name Description
TSharedRef< ... GetDefaultValueWidget () Build the widget we should put into the 'default value' space, shown when nothing connected

Classes

Type Name Description
Public struct FArguments  

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library