Skip to content

USMAssetImporterJson

Module: SMAssetTools

Inherits from USMAssetImporter

Protected Classes

Name
struct FJsonGraphNode

Public Functions

Name
virtual EImportStatus OnReadImportFile(const FString & InFilePath, const FImportArgs & InImportArgs) override
virtual EImportStatus OnReadImportData(void * InData, const FImportArgs & InImportArgs) override
virtual void OnGetBlueprintCreationArgs(const FImportArgs & InImportArgs, ISMAssetManager::FCreateStateMachineBlueprintArgs & InOutCreationArgs) override
virtual EImportStatus OnImportCDO(UObject * InCDO) override
virtual EImportStatus OnImportRootGraph(USMGraph * InGraph) override
virtual void OnFinishImport(USMBlueprint * InBlueprint, EImportStatus InStatus) override

Protected Functions

Name
void CreateStateNodeRecursive(TSharedPtr< FJsonGraphNode > InJsonGraphNode, USMGraph * InGraph, USMBlueprint * InBlueprint)
void CreateTransitionNode(TSharedPtr< FJsonGraphNode > InJsonGraphNode, USMBlueprint * InBlueprint)
bool JsonObjectToUObject(const TSharedPtr< FJsonObject > & InJsonObject, UObject * InOutObject)
TSharedPtr< FJsonGraphNode > JsonObjectToJsonGraphNode(const TSharedPtr< FJsonObject > & InJsonObject)

Protected Attributes

Name
TSharedPtr< FJsonObject > RootJsonObject
TSharedPtr< FJsonGraphNode > RootJsonGraphNode
TMap< FGuid, TArray< TSharedPtr< FJsonGraphNode > > > OwningGuidToGraphNodes
TMap< FGuid, TSharedPtr< FJsonGraphNode > > NodeGuidToNode
TMap< FGuid, TSharedPtr< FJsonGraphNode > > OwningGuidToEntryNode

Public Functions Documentation

function OnReadImportFile

virtual EImportStatus OnReadImportFile(
    const FString & InFilePath,
    const FImportArgs & InImportArgs
) override

function OnReadImportData

virtual EImportStatus OnReadImportData(
    void * InData,
    const FImportArgs & InImportArgs
) override

function OnGetBlueprintCreationArgs

virtual void OnGetBlueprintCreationArgs(
    const FImportArgs & InImportArgs,
    ISMAssetManager::FCreateStateMachineBlueprintArgs & InOutCreationArgs
) override

function OnImportCDO

virtual EImportStatus OnImportCDO(
    UObject * InCDO
) override

function OnImportRootGraph

virtual EImportStatus OnImportRootGraph(
    USMGraph * InGraph
) override

function OnFinishImport

virtual void OnFinishImport(
    USMBlueprint * InBlueprint,
    EImportStatus InStatus
) override

Protected Functions Documentation

function CreateStateNodeRecursive

void CreateStateNodeRecursive(
    TSharedPtr< FJsonGraphNode > InJsonGraphNode,
    USMGraph * InGraph,
    USMBlueprint * InBlueprint
)

function CreateTransitionNode

void CreateTransitionNode(
    TSharedPtr< FJsonGraphNode > InJsonGraphNode,
    USMBlueprint * InBlueprint
)

function JsonObjectToUObject

static bool JsonObjectToUObject(
    const TSharedPtr< FJsonObject > & InJsonObject,
    UObject * InOutObject
)

function JsonObjectToJsonGraphNode

static TSharedPtr< FJsonGraphNode > JsonObjectToJsonGraphNode(
    const TSharedPtr< FJsonObject > & InJsonObject
)

Protected Attributes Documentation

variable RootJsonObject

TSharedPtr< FJsonObject > RootJsonObject;

variable RootJsonGraphNode

TSharedPtr< FJsonGraphNode > RootJsonGraphNode;

variable OwningGuidToGraphNodes

TMap< FGuid, TArray< TSharedPtr< FJsonGraphNode > > > OwningGuidToGraphNodes;

Owning state machine guids mapped to an array of contained node guids.


variable NodeGuidToNode

TMap< FGuid, TSharedPtr< FJsonGraphNode > > NodeGuidToNode;

Each node guid mapped to an individual nodes.


variable OwningGuidToEntryNode

TMap< FGuid, TSharedPtr< FJsonGraphNode > > OwningGuidToEntryNode;

Owning state machine guids mapped to their entry node.