Navigation
API > API/Editor > API/Editor/JsonUtilitiesEditor > API/Editor/JsonUtilitiesEditor/FJsonSchemaGeneratorEditor
Description
Usually not called by a developer directly. Used by the Runtime module via the Module Feature.
Recursively walks Struct's property hierarchy, collecting editor-only meta-data like tooltips and other Meta values, returning them in the cookable metadata.
e.g: // Details for a person USTRUCT() struct FPerson {
// Full name
FString Name;
// How old they are
int32 Age; }
// A family of people USTRUCT() struct FFamily { // Members of this family
TArray
-> metadata: description -> "A family of people" PropertyMetadata -> Members = "Members of this family" Members.Name = "Full name" Members.Age = "How old they are" (ClampMin = 1)
Note: When Struct is a UFunction, function parameter descriptions will be harvested from doxygen markup in the function comment e.g: // Returns the best friend of the given person // Person: The person to find the best friend of
FPerson GetBestFriend(const FPerson& Person)
-> metadata: description -> "Returns the best friend of the given person" PropertyMetadata -> Person -> "The person to find the best friend of"
| Name | UStructToJsonSchemaMetadata |
| Type | function |
| Header File | /Engine/Source/Editor/JsonUtilitiesEditor/Public/JsonSchema/JsonSchemaGeneratorEditor.h |
| Include Path | #include "JsonSchema/JsonSchemaGeneratorEditor.h" |
| Source | /Engine/Source/Editor/JsonUtilitiesEditor/Private/JsonSchema/JsonSchemaGeneratorEditor.cpp |
static FJsonSchemaEditorMetadata UStructToJsonSchemaMetadata
(
TNotNull< const UStruct * > Struct,
const FJsonSchemaPropertyFilter & PropertyFilter,
const void * InstanceMemory
)
The collected property metadata.
Parameters
| Name | Remarks |
|---|---|
| Struct | The type to collect property data for. Can be either UScriptStruct, UClass or UFunction. |
| PropertyFilter | Determines how to filter collected struct and property data. |
| InstanceMemory | When set allows specs to be generated from FInstancedStruct and FInstancedPropertyBag. |