USMAssetImporter¶
Module: SMAssetTools
Inherits from UObject
Inherited by USMAssetImporterJson
Public Classes¶
Name | |
---|---|
struct | FImportArgs |
struct | FImportResult |
Public Types¶
Name | |
---|---|
enum uint8 | EImportStatus |
Public Functions¶
Name | |
---|---|
EImportStatus | ReadImportFile(const FString & InFilePath, const FImportArgs & InImportArgs) |
EImportStatus | ReadImportData(void * InData, const FImportArgs & InImportArgs) |
USMBlueprint * | CreateBlueprint(const FImportArgs & InImportArgs) |
EImportStatus | ImportCDO(UObject * InCDO) |
EImportStatus | ImportRootGraph(USMGraph * InGraph) |
void | FinishImport(USMBlueprint * InBlueprint, EImportStatus InStatus) |
Protected Functions¶
Name | |
---|---|
virtual EImportStatus | OnReadImportFile(const FString & InFilePath, const FImportArgs & InImportArgs) |
virtual EImportStatus | OnReadImportData(void * InData, const FImportArgs & InImportArgs) |
virtual void | OnGetBlueprintCreationArgs(const FImportArgs & InImportArgs, ISMAssetManager::FCreateStateMachineBlueprintArgs & InOutCreationArgs) |
virtual EImportStatus | OnImportCDO(UObject * InCDO) |
virtual EImportStatus | OnImportRootGraph(USMGraph * InGraph) |
virtual void | OnFinishImport(USMBlueprint * InBlueprint, EImportStatus InStatus) |
Public Types Documentation¶
enum
EImportStatus¶
Enumerator | Value | Description |
---|---|---|
Success | ||
Failure |
Public Functions Documentation¶
function
ReadImportFile¶
function
ReadImportData¶
function
CreateBlueprint¶
function
ImportCDO¶
function
ImportRootGraph¶
function
FinishImport¶
Protected Functions Documentation¶
function
OnReadImportFile¶
inline virtual EImportStatus OnReadImportFile(
const FString & InFilePath,
const FImportArgs & InImportArgs
)
Called prior to other methods so the source file can be validated and opened. This can prevent a blueprint being created or an existing blueprint graph destroyed if the input file isn't valid.
This is not called if raw import data is used instead.
Parameters:
InFilePath
- The file path of the file to be imported.
InImportArgs
- The import args are not guaranteed to be filled out.
Return: The status of the import. Returning Failure will prevent processing from continuing.
function
OnReadImportData¶
Called prior to other methods so the source data can be validated and read. This can prevent a blueprint being created or an existing blueprint graph destroyed if the input file isn't valid.
This is not called if a file path is being used instead.
Parameters:
InData
- Raw data to be read.
InImportArgs
- The import args are not guaranteed to be filled out.
Return: The status of the import. Returning Failure will prevent processing from continuing.
function
OnGetBlueprintCreationArgs¶
inline virtual void OnGetBlueprintCreationArgs(
const FImportArgs & InImportArgs,
ISMAssetManager::FCreateStateMachineBlueprintArgs & InOutCreationArgs
)
Create a blueprint for use with import. Only called if no blueprint was passed into the original import call. This method is not necessary to overload if the parent class doesn't need to change.
Parameters:
InImportArgs
- The import args are not guaranteed to be filled out.
InOutCreationArgs
- The creation args to use when creating a new blueprint.
function
OnImportCDO¶
Called when the class defaults are being imported.
Parameters:
InCDO
- The class default object.
Return: The status of the import. Returning Failure will prevent processing from continuing.
function
OnImportRootGraph¶
Called when the root graph is being imported. All sub graphs should be created at this stage.
Parameters:
InGraph
- The root state machine graph.
Return: The status of the import. Returning Failure will prevent processing from continuing.
function
OnFinishImport¶
Called after all other import methods have finished.
Parameters:
InBlueprint
- The blueprint being imported.
InStatus
- The final status of the import.