FExternalSource

Class allowing to load a [IDatasmithScene](API\Runtime\DatasmithCore\IDatasmithScene) from a source URI.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ExternalSource

Header

/Engine/Plugins/Enterprise/DatasmithImporter/Source/ExternalSource/Public/ExternalSource.h

Include

#include "ExternalSource.h"

Syntax

class FExternalSource : public TSharedFromThis< FExternalSource >

Remarks

Class allowing to load a IDatasmithScene from a source URI.

Variables

Name Description

Public variable

OnExternalSourc...

 

OnExternalSourceChanged

Delegate called on main thread every time the loaded data is updated.

Constructors

Name Description

Public function

FExternalSource

(
    const FSourceUri& InSourceUri
)

Destructors

Name Description

Public function Virtual

~FExternalSource()

Functions

Name Description

Public function

TFuture< TSh...

 

AsyncLoad()

Load the external source asynchronously, the returned TFuture gives a valid IDatasmithSceneTSharedPtr if successful.

Public function

void

 

CancelAsyncLoad()

Cancel any pending AsyncLoad() operation, pending TFuture will return invalid TSharedPtr.

Protected function

void

 

ClearOnExternalSourceLoadedDelegates()

Interrupt async task notification and clear all registered delegates.

Public function

const TShare...

 

GetAssetTranslator()

DISCLAIMER: The translator is exposed here as a temporary workaround in order to set the import option before the load and load assets with bulk data (StaticMeshes/LoadLevelSequence/etc.).

Public function Const

FExternalSou...

 

GetCapabilities()

Public function Const

TSharedPtr< ...

 

GetDatasmithScene()

Return the DatasmithScene if it is loaded, return an invalid TSharedPtr otherwise.

Public function Const

FString

 

GetFallbackFilepath()

As long as UFactory does not offer a way to import FExternalSource directly, we must rely on using filepaths, even for source that are not on the file system.

Public function Const

FString

 

GetSceneName()

Return the name of the scene that will be loaded.

Public function Const

FMD5Hash

 

GetSourceHash()

Gives the hash of the source, only returns a valid hash after loading the scene.

Public function Const

FString

 

GetSourceName()

Public function Const

const FSourc...

 

GetSourceUri()

Public function Const

bool

 

IsAsyncLoading()

True when the ExternalSource is currently loading the source asynchronously.

Public function Const

bool

 

IsAvailable()

Return true if the resource pointed by this ExternalSource is available for being loaded.

Public function Const

bool

 

IsOutOfSync()

Return true if the loaded scene is out-of-sync and needs to be reloaded.

Public function

TSharedPtr< ...

 

Load()

Load the external source and return a valid IDatasmithSceneTSharedPtr if successful.

Protected function

TSharedPtr< ...

 

LoadImpl()

Synchronously load the DatasmithScene.

Public function

void

 

SetSceneName

(
    const TCHAR* SceneName
)

Override the name of the scene that will be loaded.

Protected function

bool

 

StartAsyncLoad()

Starts an async task for loading the DatasmithScene.

Protected function

void

 

TriggerOnExternalSourceChanged()

Broadcast OnExternalSourceChanged delegates and set pending TPromises.

Public function

TSharedPtr< ...

 

TryLoad()

Attempt to load the FExternalSource according to its supported capabilities.

Typedefs

Name

Description

FOptionalScenePromise